CloudFlare cache everything, but it caches /wp-admin/ and wp-login.php

reznev799

Registered Member
Joined
Dec 5, 2022
Messages
66
Reaction score
26
I've this set of rules under "cache rules":

uri path | jolly | /wp-admin*
uri path | jolly | /wp-login.php*
cache everything

I also tried uri and full uri but nothing changes.

On that order. But CloudFlare caches everything ignoring my other 2 rules to not cache admin and login.

Ideas?
 
Can you try to use CloudFlare cache plugin such as Super Page Cache ?
 
How would it help me?

Anyway when i try to login i receive the cookie error (browser cookie not enabled). Maybe it helps.
 
Your rule order is wrong. Put the /wp-admin* and /wp-login.php* rules above the cache everything. CF stops at first match — that’s why it’s caching login.
 
Thank you. I was referring to the old page rules, but these were cache rules. It works beautifully now.

What you guys think about this solution?

1. Cache everything (ttl 1 year and browser 4 hours)
2. Exclude wp-admin and login
3. Cache css, js, images (avif, webp, png) and fonts (woff, woff2, ttf) with ttl 1 year and browser 1 year

Is it ok for a blog? Latest articles are displayed in homepage and news page.
Will it work? If the cache is emptied, even if the assets are cached for 1 year, will the homepage and news page be updated?
It's a bit confusing.
 
Back
Top