Fail to cache static content cf-cache-status: MIss

Hello,

I’m trying to cache static html from my origin server. I have made a rule for https:// * www.mydomain.xxx/ *; set it to Cache Everything, Browser Cache TTL: a month.

When i make a request, i see in the response header this: “cf-cache-status: Hit ” for homepage and for every other page either it is Product page, Contact page or My account it is “cf-cache-status: Miss” There is something obvious i’m missing so i’d appreciate any hints.

Thank you so much

It could be a cookies issue, as Cloudflare generally won’t cache when cookies are involved. Without the actual URL, we can’t give a more accurate answer.

Hello,

Thanks for your reply,

This is my website www.base53.com

I guess it’s because the cache expired too fast.

I tried to reload the contact page and now the cache status is HIT.

1 Like

I’m also getting a HIT when I reload a product page.

Yes. For reloading It says

For some pages it says Bypass and Expired.

How can I resolve this? I have set Browser Cache TTL for 1 year.

image

Browser Cache TTL controls the duration to cache something in visitor’s browser, not Cloudflare edge.

You should consider using Edge Cache TTL instead. This can be done in page rules.

2 Likes

We’re just not seeing that, and you apparently haven’t provided a specific URL that demonstrates this problem…which is different from your initial MISS problem.

However, if I put something in the Shopping cart, WC sets a cookie, and Cloudflare knows better than to start caching once someone starts using their shopping cart.

1 Like

Can you please check what you get with this URL Hit or Miss? (https://www.base53.com/product/legends-tupac-2pac-marilyn-monroe-t-shirt-men-casual-short-sleeve/) because I have cached It. Sometimes when I open new product it says Miss, after reloading or visiting again it says hit. and then after some time and clearing browser cache it says miss again. It should be cached right?

Thanks I think this was missing in my page rule. It does hit cache but sometimes it does miss too. I think I have not defined page rules correctly. I have defined 2 rules, would you mind checking which one is actually useful?

The first asterisk * in the first page rule is only useful if you have other subdomain in front of www (e.g. abc.www.base53.com). If you don’t have that, you can delete the first page rule.

Understood. Thank you so much.

1 Like

It was a HIT, then MISS, then all HITs after that.

Keep in mind that every server in every data center has an independent cache.

2 Likes

Thanks Sir,

That’s why I was confused. Now its cleared to me that it is because of different cache from different data centers.

2 Likes

Can you please tell me one thing. For the same Item which it was showing hit, now I checked and it is showing expired. Cache is expiring too fast. can you please tell me how to solve this issue even I have mentioned edge cache TTL to a month.

thank you

Sir now I have different problem cache status is not hit this time but it shows dynamic

image

whats the problem now ? does it also mean that cloudflare is caching ? even after reload cache status does not show hit. It remains dynamic.

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