Title: [Plugin: WP Super Cache] Disabling caching for a plugin/action/filter?
Last modified: August 19, 2016

---

# [Plugin: WP Super Cache] Disabling caching for a plugin/action/filter?

 *  Resolved [Trahald](https://wordpress.org/support/users/trahald/)
 * (@trahald)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-disabling-caching-for-a-pluginactionfilter/)
 * Is it possible to disable caching for the contents of a plugin, or for the results
   of an action or filter?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-disabling-caching-for-a-pluginactionfilter/#post-1196155)
 * You could define the constant “DONOTCACHEPAGE”. The page won’t be cached.
 * This only works if the page isn’t already cached of course. Otherwise use Javascript
   or half-on mode and the mfunc stuff. (See wp-cache-phase2.php)
 *  Thread Starter [Trahald](https://wordpress.org/support/users/trahald/)
 * (@trahald)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-disabling-caching-for-a-pluginactionfilter/#post-1196368)
 * Thanks. If the page is cached but the cached one is expired, and DONOTCACHEPAGE
   is now set on that page, would it still retrieve the cached value? Or would it
   adhere to DONOTCACHEPAGE since the cached page is expired.
 *  [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-disabling-caching-for-a-pluginactionfilter/#post-1196383)
 * You can only set that constant when a page is being regenerated. If the cache
   file still exists you can’t do that.
 *  Thread Starter [Trahald](https://wordpress.org/support/users/trahald/)
 * (@trahald)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-disabling-caching-for-a-pluginactionfilter/#post-1196394)
 * What I mean is, if the cache page exists but is expired and DONOTCACHEPAGE is
   defined, then the cached page will be simply be ignored right? And all requests
   to that page will be dynamic?
 *  [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-disabling-caching-for-a-pluginactionfilter/#post-1196398)
 * If a cache file is expired it doesn’t get deleted immediately. The cached file
   will still be served until it’s deleted.
 *  [pinoyca](https://wordpress.org/support/users/pinoyca/)
 * (@pinoyca)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-disabling-caching-for-a-pluginactionfilter/#post-1196437)
 * Hint: If a page’s Super-Cache file exists (i.e., in the `cache/supercache/...`
   folder), then expired or not, Apache will not even load WordPress for that page
   for ordinary visitors — so whatever config or setting or tweak or PHP you do 
   won’t matter.
 *  Thread Starter [Trahald](https://wordpress.org/support/users/trahald/)
 * (@trahald)
 * [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-disabling-caching-for-a-pluginactionfilter/#post-1196441)
 * OK I see – that’s what this rule in .htaccess does I suppose:
 *     ```
       RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
       RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
       ```
   

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Plugin: WP Super Cache] Disabling caching for a plugin/action/filter?’
is closed to new replies.

 * 7 replies
 * 3 participants
 * Last reply from: [Trahald](https://wordpress.org/support/users/trahald/)
 * Last activity: [16 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-disabling-caching-for-a-pluginactionfilter/#post-1196441)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
