Edge Cache shows EXPIRED even with 1 month TTL

Hello, I have set my cache settings as follows:

I want to cache everything for 1 month. The cache works, and shows HIT, however after less than an hour the cache returns EXPIRED in it’s cf-cache-status header:

HTTP/2 200

date: Tue, 24 Mar 2020 18:42:20 GMT

content-type: text/css

set-cookie: __cfduid=dd49a794113ad3112e906bae04137f3101585075340; expires=Thu, 23-Apr-20 18:42:20 GMT; path=/; domain=.tofusecret.com; HttpOnly; SameSite=Lax

last-modified: Sat, 22 Feb 2020 11:35:32 GMT

vary: Accept-Encoding

etag: W/“5e511204-4dfa”

x-powered-by: PleskLin

cf-cache-status: EXPIRED

expires: Fri, 24 Apr 2020 18:42:20 GMT

cache-control: public, max-age=2678400

expect-ct: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct

server: cloudflare

cf-ray: 5792880bba00aefd-KIX

I must be missing something…

If you set the cache TTL to 1 month no one guarantees you it will stay there for that long. The cache is limited in size on each POP, it’s allocated based on various factors, like plan level, size of the object (the smaller, the longer it stays), popularity of it, etc. That is a maximum value of persistence, not a minimum.

I hear you. I’m testing with a 2.7kb file, and it’s consistently being stored for less than an hour. Is it really that low?

And what really confuses me, if it was no longer in cache, wouldn’t it report MISS instead of EXPIRED? According to their docs:

That seems actually strange… the best course would probably be asking support, since they could do internal tests which us in the Community don’t have access to. If @MVP have ideas, please do share…

To contact Cloudflare Customer Support, login & go to https://dash.cloudflare.com/?account=support and select get more help. Please give Support the complete details and link to your Community post and share the ticket number here. If you receive an automatic response that does not help you, please reply and indicate you need more help.

Oh wow, thanks so much @matteo – I didn’t even realize CloudFlare had a support ticket system. It’s so hard to find!

In some ways a bit voluntarily hard, to filter the requests first to the Community which can solve most of the issues :slight_smile:

My ticket number is 1855770 . Thank’s again sir.

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