Title: Does this plugin recognize DONOTCACHEPAGE flag?
Last modified: December 20, 2019

---

# Does this plugin recognize DONOTCACHEPAGE flag?

 *  [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/)
 * I went through the code, however the plugin doesnt seem to recognize DONOTCACHEPAGE
   flag which all major WP caching plugins recognize.
 * Is there a way to tell WP Fastest Cache via PHP to not cache a page? Like setting
   a flag if a certain page which we dont want cached is being loaded?

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/page/2/?output_format=md)

 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12258304)
 * Please take a look at the following tutorial.
    [https://www.wpfastestcache.com/features/exclude-page/#exclude-page-manually](https://www.wpfastestcache.com/features/exclude-page/#exclude-page-manually)
 *  Thread Starter [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12259759)
 * Unfortunately, manual exclusion of a page would not work in our case. We want
   to automatically (programmatically) exclude certain pages which our users gate/
   lock to be only for members. So when a user gates a post to be only for members,
   we need to have a way to tell WP Fastest Cache that it shouldnt cache that page
   during page load.
 * Something like DONOTCACHEPAGE to prevent the page from being cached, or better,
   something like WPSC_SERVE_DISABLED flag of WP Super Cache that prevents serving
   a cached page and instead loads the live version.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12261071)
 * thank you so much. I will add and let you know.
 *  Thread Starter [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12261514)
 * Much appreciated. Looking forward to it.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12262986)
 * I have an idea. A function is called if a developer wants to exclude a page. 
   I can detect which plugin excludes the page this way.
 *  Thread Starter [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12263196)
 * Might work, but how is that exactly going to work?
 * If that function is called during a page load, Fastest Cache will not serve the
   page from the cache or something?
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12263211)
 * > Might work, but how is that exactly going to work?
 * A constant may be defined or the function may add something into the html source.
 * > If that function is called during a page load, Fastest Cache will not serve
   > the page from the cache or something?
 * Exactly.
 *  Thread Starter [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12263214)
 * Checking for a constant could definitely work. I believe WP Super Cache and W3
   Total Cache are also doing it. Fastest Cache can check if that constant is defined,
   and then skip serving page from cache.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12274609)
 * I added the feature for you. Please take a look at the following tutorial.
 * [https://www.wpfastestcache.com/features/exclude-page/#hook](https://www.wpfastestcache.com/features/exclude-page/#hook)
 * you need to delete wp fastest cache and download the following version to get
   the latest changes because I did not release the new version yet.
 * [https://downloads.wordpress.org/plugin/wp-fastest-cache.zip](https://downloads.wordpress.org/plugin/wp-fastest-cache.zip)
 *  Thread Starter [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12275392)
 * > Note: You need to add the following line into the wp-config.php to detect that
   > the page is excluded by which plugin or theme.
 * Is it ok if we define this in a plugin file instead of adding it to wp-config.
   php?
 * Because it is inconvenient to have thousands of users add this line to their 
   wp config.
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12275732)
 * no, you do not need to define anything in wp-config.php.
    it is just for debug.
   I removed this part from tutorial because it was confusing.
 *  Thread Starter [CodeBard](https://wordpress.org/support/users/codebard/)
 * (@codebard)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12280290)
 * Tested with the package you provided above:
 * When used from inside a function hooked to ‘wp’ hook, wpfc_exclude_current_page()
   does not trigger.
 * It turns out that if a page is cached, functions hooked to ‘wp’ action hook do
   not become available. Likely because WP Fastest Cache does its processing at 
   a hook earlier than ‘wp’ hook?
 * What is the latest action hook which this function can be called during WP’s 
   initialization?
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12280875)
 * Can you contact me via email please: [https://www.wpfastestcache.com/contact-us/](https://www.wpfastestcache.com/contact-us/)
 *  [Peter Raschendorfer](https://wordpress.org/support/users/petersplugins/)
 * (@petersplugins)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12297751)
 * Following this topic, because I’m also interested in such a functionality to 
   use with my plugin [https://wordpress.org/plugins/404page/](https://wordpress.org/plugins/404page/)
 * Please keep me informed
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/#post-12298217)
 * Please take a look at the following tutorial.
 * [https://www.wpfastestcache.com/features/exclude-page/#hook](https://www.wpfastestcache.com/features/exclude-page/#hook)
 * you need to delete wp fastest cache and download the following version to get
   the latest changes because I did not release the new version yet.
 * [https://downloads.wordpress.org/plugin/wp-fastest-cache.zip](https://downloads.wordpress.org/plugin/wp-fastest-cache.zip)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/page/2/?output_format=md)

The topic ‘Does this plugin recognize DONOTCACHEPAGE flag?’ is closed to new replies.

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

## Tags

 * [caching](https://wordpress.org/support/topic-tag/caching/)
 * [DONOTCACHEPAGE](https://wordpress.org/support/topic-tag/donotcachepage/)
 * [flag](https://wordpress.org/support/topic-tag/flag/)

 * 16 replies
 * 4 participants
 * Last reply from: [nhantam](https://wordpress.org/support/users/nhantam/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/does-this-plugin-recognize-donotcachepage-flag/page/2/#post-12621371)
 * Status: not resolved