Disable WordPress cache programmatically on a request [closed]

How do I turn off the WP Super Cache & W3 Total Cache functionality programmatically? For instance, I neither want to make it use the cache on some requests nor cache the output of the request, do they support that using filters? I couldn’t find anything useful in their documentation.

3 s
3

Easiest way to do this was to define a constant programmatically:

// Tell WP Super Cache & W3 Total Cache to not cache WPReadable requests
define( 'DONOTCACHEPAGE', true );

Leave a Comment