Closed Bug 1067045 Opened 11 years ago Closed 11 years ago

Only latest version of 'Vary'ied resource is cached

Categories

(Core :: Networking: Cache, defect)

32 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: matrix.org, Unassigned)

Details

When firefox encounters a resource with a 'Vary' header it replaces the old entry in the cache for the given URI rather then caching it alongside existing resources. Steps to reproduce: Assume the resource contains a 'Vary: Foo' header and a long cache ttl. Request resource with 'Foo: 1' -> Fetch from server. Request resource with 'Foo: 1' -> Fulfilled from cache. Request resource with 'Foo: 2' -> Fetch from server. Request resource with 'Foo: 2' -> Fulfilled from cache. Request resource with 'Foo: 1' -> Fetch from server. Expected results. The final request should be satisfied by the cache as it has been fetched before and was cacheable.
Component: Untriaged → Networking: Cache
Product: Firefox → Core
I've always believed this was a useful simplification for a UA (as long as the downside is undercaching rather than caching something inappropriate). What do you have that is varying within the scope of a single UA?
No intention to fix this. We would need to add the very'ing headers+values to the cache key mapping somehow but we know the values only after the response has arrived. This would be pretty complicated. I have to repeat myself again - the cache is not obligated to cache everything, only what's reasonable.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.