Honza Bambas wrote:
On 2/19/2014 11:25 PM, Neil wrote:
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.
cacheSession
</comm-central/ident?i=httpCacheSession>.asyncOpenCacheEntry
</comm-central/ident?i=asyncOpenCacheEntry>(URL
</comm-central/ident?i=imgURL>, nsICache
</comm-central/ident?i=nsICache>.ACCESS_READ
</comm-central/ident?i=ACCESS_READ>, cacheListener
</comm-central/ident?i=cacheListener>);
2. Returning the size of the disk cache
You can asynchtonously visit a storage as mentioned above or this will
be available via index.
The old way is to visit devices and then the device info includes the size.
--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform