On 11/7/11 3:41 PM, Brian Smith wrote:
Ask the HTTP cache for the unparsed resource If the HTTP cache didn't return 
something new

So this would be checking isFromCache() on the caching channel in OnStartRequest?

The problem is what to do then. If we cancel the channel at that point, does that still evict it from the HTTP cache?

then keep your parsed objects as is, otherwise rebuild them.

That's the idea, yes, but having to separately manage a store for those objects when the HTTP cache already stores the unparsed form of that data is a little annoying. Then again, if we want to have a different eviction policy maybe

Rely on the server to properly specify cache-control directives to avoid 
revalidations, so that the cache only has to fetch the resources when they 
expire and/or are evicted.

Yes, that's the idea.

By the way, disk space has become a scarce resource again because of mobile. 
Make sure you have a good strategy for managing whatever disk space you take up 
for your higher-level cache.

See, this is one reason it might make sense to store the higher-level data directly in the HTTP cache for cases when we want to put it on disk at all.

-Boris

_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network

Reply via email to