local storage vs cache
Taras Glek <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.netlib |
|---|---|
| Message-ID | <[email protected]> |
Hi, I've been looking at why people use dom local storage(http://hacks.mozilla.org/2012/03/there-is-no-simple-solution-for-local-storage/ has some good discussion). A lot of use seems to come from the fact that developers don't trust the network cache. Perhaps we could provide some apis to * group items(this would also be a big win for disk locality) * prioritize cache items * query if an item is in cache + ability to request items out of cache without a network request(even if headers are expired) * evict an item * place an item in cache(ie a generated image) * evict an item from cache Here is post to start thinking about this: http://www.garfieldtech.com/blog/caching-tng I know historically we were reluctant to expose detailed cache info to the web, perhaps it's time to reconsider some aspects of that? The nice thing about the disk cache is that it has expiry logic, is supposed to efficiently cache large blobs(something that indexeddb/LS[databases in general] struggle at). Btw, it turns out indexeddb isn't a good successor to LS in current form because it's slow, requires a prompt, doesn't have a good data-cleanup story. Taras ps. This isn't a concrete feature request, just something to consider while we look at how to evolve the network cache.