Re: Using HTTP cache control for invalidating a cache of parsed objects

Boris Zbarsky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.netlib
Message-ID <[email protected]>
On 11/7/11 5:51 AM, Henri Sivonen wrote:
> Do we have infrastructure in place that allows a cache on a higher
> layer than Necko maintain cache coherence according to HTTP rules when
> the higher layer maintains a cache of object that have been parsed
> from HTTP responses so that if the cache is fresh (from the HTTP point
> of view) the objects don't get reparsed?

Not really.  We have a bug on attaching interesting binary data to necko 
cache entries.

> Does the image cache use something like this by any chance?

The image cache has a hack where it returns possibly-outdated data, then 
does the HTTP response and sees what the HTTP level says; if new data 
comes in it sends that on.  That sorta maybe works for images, but 
wouldn't work for non-idempotent resources....

> Should a higher-level cache even want to maintain HTTP-correct cache
> coherence in situations where determining cache coherence would
> require pinging the origin server with an etag and should a
> higher-level cache work with expiry times instead and simply not
> support etags?

Seems like that would be the sanest behavior, yes...

-Boris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.