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.
Related Posts:
- W3 total cache – cache refresh programmatically [closed]
- Best way to show Dynamic Content on a Cached WordPress Site?
- Pros and Cons for high “expire time” on wp-super-cache or w3-total-cache? [closed]
- Limit cache size from W3 Total Cache [closed]
- WordPress Browser Cache with W3-Total-Cache doesn’t show new posts [closed]
- Varnish + W3 Total Page Cache [closed]
- W3 Total Cache doesn’t detect memcached [closed]
- Settings to get the most out of W3 Total Cache
- How to force content refresh of a page that has been loaded previously by the user? [closed]
- Transient / object cache maximum key length [duplicate]
- Should the page cache be refreshed often? [closed]
- What is difference between ‘Page Cache’ and ‘Object Cache’ in WordPress?
- Getting soft 404 errors (200 status) when caching plugins are enabled
- How can I cache WordPress Rest API Response
- server load. $_SERVER[‘REMOTE_ADDR’] and $_SERVER[‘HTTP_HOST’] [closed]
- Headway body classes and W3TC page cache conflict [closed]
- How to cache a different page version based on HTTP header?
- W3 Total Cache can’t create files [closed]
- Combile External JS files using W3 Total Cache [closed]
- How can I cache font files on WordPress [closed]
- W3 total – leverage browser caching not working with cdn delivered images [closed]
- HIgh CPU usage – Will using cache plugins help
- Scheduling doesn’t work due to caching?
- APC fragmention woes on Apache AWS EC2 Small instance with WordPress and W3TC [closed]
- w3 total cache – Object Caching 2165/2469 objects? [closed]
- Changing WP Object Caching during runtime
- I’m receiving the following error using the below code: Uncaught Error: Cannot use object of type WP_REST_Response as array
- Clear cache when comment is added
- WordPress varnish pages printed twice
- WordPress Userroles button getting cached
- w3 total cache uninstall remove cache
- Page wrongly displayed when cache plugin activated
- Bluehost WebHost and performance problems with W3TC [closed]
- W3 Total Cache Minification: way to revert back? [closed]
- Cache a number of responses from external json feeds?
- Prevent WordPress from sending Cache-control http header
- Optimize apache for WP use
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- Multiple WordPress sites eat up alot of RAM
- What exactly is an advanced object cache?
- Using a wildcard with delete_transient()
- Is it possible to disable caching of an option when using w3 total cache?
- How to loop through JSON data in wordpress WP REST API
- WordPress REST API – JSON “Rendered” Content Incorrect
- How to purge all transient caches?
- Writing a cache manifest file for a WordPress blog (app cache, offline web applications)
- How to exclude a specific template from being cached by a CDN [closed]
- WP REST API route request explain
- Add Category Name to REST API
- WordPress caching in development
- W3 total Cache – Site with query strings
- Using Multisite with a CDN?
- Can’t GET draft posts via REST API from headless frontend
- Automatically enabled caching in some hosting companies w/o visible plugin (Must use plugin)
- Keep user’s privileges on accessing contents in JSON response
- How to purge all transient caches?
- W3 Total Cache plugin integration
- WordPress REST API, Expired Nonce from Cache results in 403 forbidden
- Plugin Expires Headers – W3 Total Cache [closed]
- Transient API and caching Plugins
- Why aren’t tags and categories added in post request to WP Rest API
- pass-protected pages and posts not protected after enter them 1 time
- Static HTML page caching for large website [closed]
- Querying A Post That Includes Two Taxonomies Using JSON Rest API
- WP Super Cache Bug with Ubermenu
- Problem with caching, W3TC [closed]
- Reasonable Size Limit to options entry
- Is the object cached?
- How to find time last viewed?
- Cache wp-json/posts without a plugin?
- Running code before object-cache.php runs
- Hook an action when a transient is deleted ? Can’t get it to work!
- REST API: Display Category names in JSON?
- Theme compression/ minifying or W3 Total Cache – which should I use? [closed]
- RSS: fetch_feed caching with different caching delay per feed?
- Include results with tags relevant to the search keyword with JSON rest API v2
- How to be sure to get last page version without ANY cache?
- How to clone all WordPress Rest API end points
- WP REST API and Access-Control-Allow-Origin
- Browser cache for dynamic content (list of tags)
- How to specify expiration of cacheable resources? [closed]
- How do I serve fully cached full HTML on cloudfront
- What archive plugin works with W3 total cache? [closed]
- WordPress REST API not working on localhost
- Memcaching recurring SQL Queries
- Get html from custom route api
- dynamic page not displaying correctly when Varnish hosting ignores query string parameters
- What’s the right way to validate JSON data coming from an AJAX POST request?
- WordPress API “code”:”rest_no_route” with Custom Route
- Consult array data in REST API Filter
- Feed cache fallback – A feed could not be found
- Best way to make a JSON API from WordPress?
- Splash pages on a high traffic site
- Pagination in WP query with transient API
- After Migration, Warning: include_once() errors on all pages
- Server Variables not recognized in certain posts
- W3 Total Cache benefits without using plugin? [closed]
- WordPress Rest API Escapes Returned URLs Forward Slash
- How I define max cache time to Google Fonts installed on my site
- Keeping Objects in Memory