I been investigating Picaso, image downloading and caching library for Android. And I found out that their caching mechanism is based on Android HttpResponseCache. The documentation says:
To measure cache effectiveness, this class tracks three statistics:
- Request Count: the number of HTTP requests issued since this cache was created.
- Network Count: the number of those requests that required network use.
- Hit Count: the number of those requests whose responses were served by the cache.
So how exactly Android Http cache is working?
- How Android knows to cache or not to cache a file, and for how long?
- When exactly the cache is been cleaned, and by who?
- How can I override the default http caching mechanism with my own? And should I?