Title: do not cache via php?
Last modified: December 19, 2018

---

# do not cache via php?

 *  Resolved anonymized-14087207
 * (@anonymized-14087207)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/do-not-cache-via-php/)
 * I wonder if it’s possible to disable caching for a page via php. For example 
   by calling an action inside the functions.php or wherever the plugin is called
   the first time?
    In my case I have a specific template and want all sites with
   that template to not be cached. But typing my-template.php inside the excluding
   list doesn’t do the trick – only using the site urls. This is kind of annoying
   if you have dozens or hundreds of sites and need to copy paste each string into
   this excluding list.

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

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/do-not-cache-via-php/#post-11016026)
 * You can set the constant DONOTCACHEPAGE and that request won’t be cached.
 *  Thread Starter anonymized-14087207
 * (@anonymized-14087207)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/do-not-cache-via-php/#post-11016764)
 * thanks for your response, this helped.

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

The topic ‘do not cache via php?’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: anonymized-14087207
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/do-not-cache-via-php/#post-11016764)
 * Status: resolved