Open bbockelm opened 1 week ago
So, Matevz, Alja, and I agree the age header should be returned with a HEAD request if the server has a file cache. The HTTP plugin can easily determined if a file cache exists. An AGE 0 will imply the file does not exist in the cache though strictly you should be using GET with IF-CACHED to avoid race conditions. We will proceed on this path unless we hear otherwise. Also, please read our responses to pull request 2348 on how we will handle the side effects of GET vs HEAD.
The
Age
header is currently only sent when aGET
is performed against an XCache configuration.This is a bit of a catch-22: there's no way to query if a cache has a given file without it triggering XCache to download a part of the file (I currently do a byte-range request for the first byte of the file). Due to #2348, that means XCache effectively always claims to have the file -- making the header less-than-useful.
The
Age
header logic is fairly simple: let's go ahead and also send it for the HTTPHEAD
verb.