On 2/19/2014 11:25 PM, Neil wrote:
Is the conversion straightforward?
The API is mostly similar, we've took it more as a chance for a cleanup since some modification were necessary anyway.
In particular, the API calls I'm interested in: 1. Given an HTTP or FTP URI, return the size of the cached data
How do you do that now? Only way known to me (with the old cache is visit of a cache device). We don't have devices now, we have purpose-distinct storages. Those can be visited too. But only fully asynchronously.
But this information may also be available via cache index (r+'ed, pending landing)
2. Returning the size of the disk cache
You can asynchtonously visit a storage as mentioned above or this will be available via index.
3. Clearing the disk and memory cache
The API to use is a bit different, but still similar to what we had with cache1
4. Clearing the offline app cache
Similar as above, we have a specific storage for appcache. Note that the appcache backend has not changed a bit.
Also, are the prefs used by the cache the same?
Yes! Only some new added and some (less important) are currently unimplemented (bugs pending)
In particular, browser.cache.check_doc_frequency,
This doesn't touch the cache backend. I personally think it's misnamed.
browser.cache.disk.capacity,
Patches r+'ed and pending to land after we run a crash-stat+telemetry trial currently happening on mozilla-central.
Shortly: we support it.
browser.cache.disk.parent_directory
Pending review.
and browser.cache.disk.smart_size.enabled come to mind.
Not supported right now, will be one of the first things to update after cache2 goes out.
-hb- _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform