Hello,
I am delivering some images through a web service.
Here below the scenario with a dummy resource example: /api/myimage
Step 1
I have 2-minute cache in the Akamai edges and downstream cache.
Step 2
My clients download my resource /api/myimage
and, when the Akamai cache expires, they perform an HTTP request with the ETag header.
My API returns
- a 304 if the resource is not been changed
- a 200 with the new resource if it’s changed
Step 3
Now I am improving the service returning the Edge-Cache-Tag
header.
In this step the Akamai and downstream cache is still at 2 minute.
Step 4
I change the Akamai caching value to 1day keeping the downstream cache to 2 minute.
Step 5
I change the resource /api/myimage
and I send an invalidation request with the given tag.
What is the expected behavior?
I believe it depends on the edge caching state.
If the edge has stored in the cache the resource without the Edge-Cache-Tag
header and it has continually revalidated it, the edge has no knowledge of the Cache-Tag I set.
If the edge has stored the original resources without the Edge-Cache-Tags
and then, for some reason, it has removed it from the cache and then requested it again with the Edge-Cache-Tag
, when I call the API I will purge it from the cache.
Could you please confirm the behavior or explain to me what should happen in the above scenario?
Looking at the edge header behavior I see that if I change a header in the 304 response it will not change the cached value.
All the best
Luca