Cloudflare - The admin bar is cached/Should I Use Cloudflare’s Cache Everything

In this Article

Admin bar is cached

When you enable Cache Everything in Cloudflare's Page Rules, it doesn't distinguish between logged in and logged out users. This means that if you view the site while logged in, it will cache that version and show it to all users. 

You can verify if this is the issue by turning off the  Cache Everything Page Rule in Cloudflare and testing again. From the Page Rules tab, you can do it as shown below:

If this helps, you should delete that page rule.

The only way real way around this is if you have a Business plan with Cloudflare and can use the bypass based on cookie feature. 

If you want to use Cache Everything, don't have a business plan and don't want the admin bar cached, you'll have to prevent the admin bar from being displayed on the front end of your site.

You can find more info, here: https://community.cloudflare.com/t/cache-everything-with-wordpress/556

Cache Everything isn't working

The browser cache rules set by WP Rocket in the htaccess file may be preventing Cache Everything from taking effect. Use the Edge TTL setting in Cloudflare to resolve this. 

Cache Purging

When WP Rocket detects that Cache Everything is enabled for your site, the purging of the Cloudflare cache will be automatically sync-ed with the purging of the WP Rocket cache.

Getting mobile version for desktop or the opposite

Cloudflare cache everything is not able to cache by device type. It will cache the first request of the page and keep serving it to all following visits.

Caching by device type is available only on their Automatic Platform Optimizations (APO), and Enterprise paid plan.

If your theme requires having seperate cache for mobile devices, you should turn off Cloudflare cache everything or subscribe to their APO service.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.