We’re seeing requests making it to our static servers more often than we would expect given that we are returning an Expires header 24-hours in the future for each new request. An overwhelming majority of these are 304 responses by us, and we’ve noticed that the Expires header that we are returned looks to be cached by Fastly for a long time – after a few days, our Expires header on an asset being served by Fastly will not have moved and be multiple days in the past. Circumventing Fastly and requesting from the server directly, we see the expected 24-hour Expires header.
The only other cache-related header we return is a Last-Modified, which often goes a number of days without changing. Is there a conflict between those two headers that could lead to Fastly letting requests through to our static servers more frequently than we would like it to? For example, perhaps expecting that an unchanged Last-Modified means it can reuse the Expires header that it saw previously?
Please sign in to leave a comment.