Question on Cache Everything

Hello,
I have a WordPress site. If I want to cache everything and this still function properly do these page rules make sense? This is for resphealth.org

1: resphealth.org/wp-admin/*
-Cache Level: Bypass

2: resphealth.org/*
-Cache Level: Cache Everything
-Edge Cache TTL: 2 hours

Or will this somehow always bypass the cache since i’m bypassing wp-admin? One idea is to use a page caching plugin and so the /* will cache all the cached pages from the plugin while /wp-admin/* won’t affect that since those cached pages won’t hit /wp-admin ever.

We have a pro plan, not a business plan.

Thank you!

That’s a good strategy.

The only way it’ll bite you is if someone who’s logged in starts crawling the site. Cloudflare will cache that version of the page. Sometimes with an Edit Tag, or that person’s name if they want to leave a comment (if your site has commenting enabled). People won’t be able to swoop in and have access to the other user’s profile. It just looks glitchy.

How come I see so many uncached requests with these page rules? Being a Saturday there shouldn’t be any users really in the backend. Is there a way to tell what requests are the ones not being cached?

Best would be to check the log on your origin server, and see which paths are most commonly requested. If it hits your origin, Cloudflare wasn’t able to serve it from cache.

Also note that Cloudflare doesn’t use a global cache, meaning every PoP will need to warm up its own.

1 Like

have a tool for that Warming Up Cache Geographically Using Webpagetest :grin:

1 Like

if I look at my server logs and see CFNetwork, am I too assume this is Cloudflare trying to cache this resource?

Not necessarily.

I checked your site and noticed the events section isn’t being served from cache. Is that intended and perhaps those pages are requested often?

What is your current ratio of cached/non cached requests?

if your server logs show Cloudflare network IP addresses, then you probably need to make sure you have restored visitors’ real IP addresses as per https://support.cloudflare.com/hc/en-us/sections/200805497-Restoring-Visitor-IPs

Also check out

I did have a different page rule set for the /specialevents path to clear the cache more often… It did not have cache everything set because I thought the /* was doing that, but maybe it was overriding the /*. I’ve now set that and will see if that changes any results.

For the past 6 hours the cached/non-cached ratio is basically 50/50. I also don’t cache /wp-admin so anyone logged in will bypass the cache, but it was showing the same ratio in the middle of the night.

Is it possible having a caching plugin AND Cloudflare is somehow causing Cloudflare not to cache content? I really like the cache plugin I use as it does a great job. I was hoping Cloudflare would just cache the html generated by that plugin.

Ok update.
-I have turned off admin bar and any edit buttons.
-I set my WP cache to show even to logged in users
-One page rule: resphealth.org/* with browser cache ttl: 1 hour, cache everything, and edit cache ttl 16 hours
-When I view the home page in chrome and inspect the dev tools network tab, the top item is cf-cache-status: HIT. Great! BUT a lot of files below that (served from that domain) say cf-cache-status: MISS

Am I doing something wrong? Is there a header rule I’m missing on my site for those files?

Thanks so much!

looks like those files are HITs now! I’ll keep this post updated once I’m confidant I have everything set as it should!

1 Like

I, use and works

  • wordpress/Cloudflare plugin and on Automatic Cache Management.
  • iThemes Security add white list Cloudflare ip: IP Ranges
  • Cloudflare firewall add my hosting ip (I do not know whether it is important)
  • Disable wordpress themes admin bar/menu

Cloudflare page rule and cache options:

Speed: only disable rocket
Slow page download disables some javascript eg Dynamic Web Badges!
Then Cloudflare Cache process may slow down.
Other all acceleration is enabled.

Add widget Standard Web Badges
add footer Dynamic Web Badges

Sorry Google Translate!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.