custom php file inside my custom folder of plugins directory is not caching

Caching is not magic, someone needs to write the code for it. Caching plugins will handle most basic page types in wordpress, but anything which is not a post will most likely need to have an explicit integration with the caching plugin, or just have its own caching.

side note: it is a big no-no to directly access php files that are in the wp-content directory. If this is part of a plugin, you should either use the ajax or the json end points for whatever you are doing. If it is for your own site, better to place the file at the wordpress root directory, or totally outside it.