Worker retrieve the cache age of a cached request?

@harris is it possible to get the cache age of cached request from a Worker ?

I tried the following but doesn’t return anything?

const cacheAge = request.headers.get('age')

Would this depend on the edge node location? I thought all edge node caches were independent, so their ages would be as well.

yeah would be CF edge server dependent but it should still be relative.

1 Like