Can we verify Edge Cache TTL rules are working?

I just migrated some edge cache page rules to the new system. Is it possible to verify that the edge cache TTL rules are working properly for a given URL?

Using the Trace tool shows which rules have been applied, which is helpful. But Trace does not show the result. Also, the result is not visible in response headers according to this page,

Edge Cache TTL is not visible in response headers.

You won’t be able to see the value. What I end up doing is set up a script to curl the same URL every minute with timestamps, then see when it gets something other than a HIT.

1 Like

You won’t be able to see the value. What I end up doing is set up a script to curl the same URL every minute with timestamps, then see when it gets something other than a HIT.

That would be a long test, given that cache can be set to up to a year.

I have two rules that set cache, and I wanted to ensure the correct one applies. Trace only shows that both rules match:

It would be helpful if Trace could indicate which rule’s logic applies to the final result. I’ve read the cache rules documentation, so I know “the last matching rule wins”, but it would be nice to have a quick test to confirm.

24 hours should be long enough to confirm if it’s long-term or not. Just remember that Edge Cache TTL is not a guarantee. It’s a max-value for how long a resource is allowed to stay in cache. Most users don’t have resources popular enough to stay in cache for a long time. Anybody who does have something popular enough isn’t going face much of an impact of .01% of the requests not being a cache HIT.

It’s more like “the last setting wins.” So, if you’re wondering about Edge Cache TTL, just look for that.

2 Likes

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