Name
vary_ignore_expire
Synopsis
When certain HTTP/1.1 origin servers receive an HTTP/1.0 request (e.g., from Squid),
and the response contains a Vary
header, they also add an Expires
header set to the current time. This is to prevent HTTP/1.0 caches,
which may not understand the Vary
header, from incorrectly reusing a cached response.
Squid understands and implements the Vary header but still sends the string
“HTTP/1.0” in its requests. You’ll need to enable this directive if
you want to get cache hits from responses with Vary and with Expires equal to Date. This directive is somewhat dangerous
because the origin server may have its own reasons (other than
maintaining backward compatibility) for setting the Expires header.
Syntax | vary_ignore_expire on|off |
Default | vary_ignore_expire off |
Example | vary_ignore_expire on |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access