APO and admin-ajax.php request

Does APO cache admin-ajax.php request? If not how to make it cache request which use AJAX?

You probably do not want to cache that, as that is dynamic output.
Cloudflare should not cache Ajax requests.
Are you using GET or POST?
You want to cache the resposne of it? If so, is the response in JSON format or some other? You can setup Cache-Control, Expiries, Pragma, ETag, etc. HTTP headers for the response in JSON.
Moreover, you can use Varnish if familiar with that, but you have to set it up on the origin/server side.


Generally APO aims to cache only HTML content. We hear from time to time that JSON caching could be useful for some customers. At the moment it’s not on a roadmap, but we can extend APO support to JSON in the future.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.