Title: cache not detected
Last modified: May 29, 2023

---

# cache not detected

 *  Resolved [cositadmin](https://wordpress.org/support/users/cositadmin/)
 * (@cositadmin)
 * [3 years ago](https://wordpress.org/support/topic/cache-not-detected/)
 * We are having an issue where a page is not updating on desktop, but it does for
   mobile. While investigating I’ve run the cache test and got the following results.
 * > Page caching seems not working for both dynamic and static pages.
   > Error on dynamic page ([https://campground.myselkirk.ca](https://campground.myselkirk.ca)):
   > The plugin is not detected on your home page. If you have activated other caching
   > systems, please disable them and retry the test.
   > Error on static resource ([https://campground.myselkirk.ca/wp-content/plugins/wp-cloudflare-page-cache/assets/testcache.html](https://campground.myselkirk.ca/wp-content/plugins/wp-cloudflare-page-cache/assets/testcache.html)):
   > Cache status: DYNAMIC – The resource was not cached by default and your current
   > Cloudflare caching configuration doesn’t instruct Cloudflare to cache the resource.
   > Instead, the resource was requested from the origin web server.
   > Please check if the page caching is working by yourself by surfing the website
   > in incognito mode ’cause sometimes Cloudflare bypass the cache for cURL requests.
   > Reload a page two or three times. If you see the response header **cf-cache-
   > status: HIT**, the page caching is working well.
 * Any help would be appreciated.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcache-not-detected%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years ago](https://wordpress.org/support/topic/cache-not-detected/#post-16778832)
 * Hi [@cositadmin](https://wordpress.org/support/users/cositadmin/),
   Looking at
   the response header of your website I do not see this plugin being active: [https://i.imgur.com/Tg7fWwx.jpeg](https://i.imgur.com/Tg7fWwx.jpeg)
 * So, either you have disabled this plugin or you have some other page caching 
   plugin installed in your website. If you have disabled this plugin, please enable
   it back so that we can test your site and also if you have any other page caching
   plugin like WP Rocket or other installed, please disable that.
 *  Thread Starter [cositadmin](https://wordpress.org/support/users/cositadmin/)
 * (@cositadmin)
 * [3 years ago](https://wordpress.org/support/topic/cache-not-detected/#post-16783759)
 * There are no other cache plugins installed currently, but I decided to check 
   out htaccess file because we had been using WP Rocket previously. I saw there
   was still code from WP Rocket in the htaccess file, so I’ve removed it. I’m still
   not seeing the cache being detected but the error has changed now.
 * > Page caching seems not working for both dynamic and static pages.
   > Error on dynamic page ([https://campground.myselkirk.ca](https://campground.myselkirk.ca)):
   > The plugin is not detected on your home page. If you have activated other caching
   > systems, please disable them and retry the test.
   > Error on static resource ([https://campground.myselkirk.ca/wp-content/plugins/wp-cloudflare-page-cache/assets/testcache.html](https://campground.myselkirk.ca/wp-content/plugins/wp-cloudflare-page-cache/assets/testcache.html)):
   > Unable to find the Cache-Control response header.
 * I see the WP Cloudflare Super Page Cache entry in the htaccess file, there is
   one entry from another plugin after that.
 * > # BEGIN AppPresser CORS 1
   > # The directives (lines) between `BEGIN AppPresser CORS 1` and `END AppPresser
   > CORS 1` are
   > # dynamically generated, and should only be modified via WordPress filters.
   > # Any changes to the directives between these markers will be overwritten.
   > <IfModule mod_rewrite.c>
   > RewriteEngine on
   > RewriteCond %{HTTP:Authorization} ^(.*)
   > RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1]
   > </IfModule>
   > # END AppPresser CORS 1
 * This is from a plugin for Apppresser.
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years ago](https://wordpress.org/support/topic/cache-not-detected/#post-16784032)
 * Hi [@cositadmin](https://wordpress.org/support/users/cositadmin/),
   I’m still 
   not seeing any headers that are added by this plugin in the response header. 
   Can you please try removing the htaccess rules except the WordPress default rule
   and the rules added by this plugin? Now sure why nothing is showing up in the
   response header.
 *  Thread Starter [cositadmin](https://wordpress.org/support/users/cositadmin/)
 * (@cositadmin)
 * [3 years ago](https://wordpress.org/support/topic/cache-not-detected/#post-16786890)
 * This is what’s currently in the htaccess file
 * >     ```wp-block-code
   >     RewriteOptions inherit
   > 
   >     BEGIN WordPress
   > 
   >     RewriteEngine OnRewriteBase /RewriteRule ^index.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]
   > 
   >     END WordPress
   > 
   >     order allow,deny allow from all
   > 
   >     deny from 20.106.252.78deny from 185.221.132.232deny from 20.109.51.143deny from 185.136.205.110deny from 20.38.4.239
   > 
   >     deny from 20.83.59.236deny from 35.236.102.231deny from 38.111.114.211
   > 
   >     php -- BEGIN cPanel-generated handler, do not edit
   > 
   >     Set the “ea-php81” package as the default “PHP” programming language.
   > 
   >     AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
   > 
   >     php -- END cPanel-generated handler, do not edit
   > 
   >     deny from 20.169.228.36
   > 
   >     BEGIN cPanel-generated php ini directives, do not edit
   > 
   >     Manual editing of this file may result in unexpected behavior.
   > 
   >     To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
   > 
   >     For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
   > 
   >     php_flag display_errors On php_value max_execution_time 60 php_value max_input_time 90 php_value max_input_vars 3000 php_value memory_limit 256M php_value post_max_size 128M php_value session.gc_maxlifetime 1440 php_value session.save_path "/tmp" php_value upload_max_filesize 64M php_flag zlib.output_compression Offphp_flag display_errors On php_value max_execution_time 60 php_value max_input_time 90 php_value max_input_vars 3000 php_value memory_limit 256M php_value post_max_size 128M php_value session.gc_maxlifetime 1440 php_value session.save_path "/tmp" php_value upload_max_filesize 64M php_flag zlib.output_compression Off
   > 
   >     END cPanel-generated php ini directives, do not edit
   > 
   >     deny from 195.3.221.95deny from 195.3.221.96deny from 195.3.221.94deny from 195.3.221.1deny from 195.3.221.2/31deny from 195.3.221.4/30deny from 195.3.221.8/29deny from 195.3.221.16/28deny from 195.3.221.32/27deny from 195.3.221.64/27deny from 195.3.221.96/30deny from 195.3.221.100deny from 95.214.55.100/30deny from 95.214.55.104/29deny from 95.214.55.112/28deny from 95.214.55.128/26deny from 95.214.55.192/29deny from 95.214.55.200
   > 
   >     BEGIN WP Cloudflare Super Page Cache
   > 
   >     The directives (lines) between BEGIN WP Cloudflare Super Page Cache and END WP Cloudflare Super Page Cache are
   > 
   >     dynamically generated, and should only be modified via WordPress filters.
   > 
   >     Any changes to the directives between these markers will be overwritten.
   > 
   >     ExpiresActive on ExpiresByType application/xml "access plus 0 seconds" ExpiresByType text/xsl "access plus 0 seconds"Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0"Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0"RewriteCond %{REQUEST_URI} ^(.)?/wp-content/wp-cloudflare-super-page-cache/www.myselkirk.ca/debug.log(.)$ RewriteRule ^(.*)$ - [F]Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0"
   > 
   >     END WP Cloudflare Super Page Cache
   >     ```
   > 
 * The only things I can see are WordPress, Cpanel and the cache plugin.
 *  Thread Starter [cositadmin](https://wordpress.org/support/users/cositadmin/)
 * (@cositadmin)
 * [3 years ago](https://wordpress.org/support/topic/cache-not-detected/#post-16789583)
 * Also as a part of cleanup I went through our database and WP-Config file and 
   removed all entries from WP Rocket. While I have seen other pages that were not
   updating now are updating. Also I’ve gone and completely uninstalled the Super
   Page Cache plugin and reinstalled it, this page cache not showing is the only
   remaining problem.
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years ago](https://wordpress.org/support/topic/cache-not-detected/#post-16793719)
 * Hi [@cositadmin](https://wordpress.org/support/users/cositadmin/),
   Thanks for
   implementing those fixes. Now I can see the plugin headers are being properly
   reported in the response header. Also looking at the response header, I can see
   that despite the plugin setting all headers properly your pages are still not
   being served from CDN cache.
 * This is because in the response header I see a `set-cookie` header for a cookie
   named `WP_SESSION_COOKIE`. This is the reason behind your problem. You see, if
   any plugin or theme that you are using in your WP site is setting any cookies
   at the PHP level, it creates those cookies using the `set-cookie` in the response
   header.
 * The problem is anytime Cloudflare sees `set-cookie` is present in the response
   header, it will never cache that page thinking that the cookie value might be
   used inside the page to show dynamic content. As a result the page should be 
   served from the origin server.
 * You can try deactivating this plugin who is adding this cookie and you will see
   that your cache is working fine. You can also reach out to the plugin developers
   asking them if there is a way to use the plugin without using the cookies.
 * To make a site cache friendly, it is very important not to set any cookies at
   the PHP level. Instead do the checks at the JavaScript level and take advantage
   of the LocalStorage browser API. Moreover if cookies are must need to be set,
   it is best to set the cookies at the JavaScript level as it will not conflict
   with caching.
 * Screenshot: [https://i.imgur.com/GQmu9I4.jpeg](https://i.imgur.com/GQmu9I4.jpeg)

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

The topic ‘cache not detected’ is closed to new replies.

 * ![](https://ps.w.org/wp-cloudflare-page-cache/assets/icon-256x256.gif?rev=3234997)
 * [Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals](https://wordpress.org/plugins/wp-cloudflare-page-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cloudflare-page-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [iSaumya](https://wordpress.org/support/users/isaumya/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/cache-not-detected/#post-16793719)
 * Status: resolved