URL is not getting cached as needed due to sudden changes in the value of age header

At my first request the headers are:

access-control-allow-origin: *
age:5580
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
cache-control:public, max-age=14400, proxy-revalidate
cf-cache-status:HIT

At second request I am getting age which is way low than previous:

access-control-allow-origin:*
age:1753
alt-svc:h3=":443"; ma=86400, h3-29=":443"; ma=86400
cache-control:public, max-age=14400, proxy-revalidate
cf-cache-status:HIT

At third request, getting different age:

access-control-allow-origin:*
age:1546
alt-svc:h3=":443"; ma=86400, h3-29=":443"; ma=86400
cache-control:public, max-age=14400, proxy-revalidate
cf-cache-status:HIT

Why is this happening? Because of this my cache is getting expired quickly. Sometimes when I request the age becomes value that closer to the max-age which was previou just 1000s.

Cache is set by the TTL. As the asset ages the time remaining before the asset needs to be revalidated decreases. The results here appear normal.

Even if it is lowering or getting increasing, it should be gradual right. The age:5580 changing to age:1753 in just less than a second. I try to request it multiple times in a 3-5 seconds, but the age difference is 1000s. Why is that? And my TTL is max-age: which is 14400. And only after that it should show a MISS, EXPIRED, right?

Do you have an example URL? The only answer that seems plausible at the moment is that you’re in a parallel universe where time runs differently.

Yes, First I thought it might be like that, check out this site (https://disposablepod.com) which uses Cloudflare. And in POSTMAN/some similar tool with GET Request, try it. Randomly hit some request, you could see the age is getting sometime 577 then 704, then 585, then 577 like that in a small timespan. Is this can occur because of Tiered cache?

The site appears to be using APO and the differing cache TTLs are likely due to different worker processes responding.

1 Like

Thanks for the info. For my site, I am not using WordPress. Maybe something I miss. Anyway congrats for your Aniverssary in this community.

1 Like

Glad we can assist.

Are you using a hosting service that may be on Cloudflare?

Checking the response headers APO is definitely active.

Har available for a week: https://tempfile.io/en/cfBTsIupnug9R3V/file

Sorry for the confusion, that isn’t my website. similar to this site i get different values for age header when trying to load multiple times. for my site , it doesn’t use APO or wordpress. But i found similar issue with this site i have menstioned.

Thanks for the Clarification.

Can you provide the domain name on Cloudflare?

Can you capture a HAR file of the issue?

This is one another site, I found the same issue as mine, netsbot.com. I checked whether it is wordpress and it’s not.

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