Android - HTTP Cache is not stored in cache folder


The HTTP cache from CacheManager is of unlimited size, and is not stored in the cache folder.
The HTTP cache used for OkHttp is limited to 10MB, but is not stored in the app's cache folder.

Epic Link


Mian Khalid
September 5, 2017, 11:48 AM

Sure I'll give it a look and update accordingly.

Marco Morales
August 31, 2017, 10:54 PM

, , - Would love an update / opinion on this and what we should do. We can move to the learner project and groom if it is still applicable.) Thanks!

Marco Morales
January 3, 2017, 3:01 PM

What would be the impact of this change? This story was hiding it seems in the active sprint but in a state we couldn't see. Now that we see it, should we handle soon or is this a backlog / cleanup item?

cc'ed , for input / thoughts

Brian Guertin
August 17, 2016, 8:12 PM

Note: we currently rely on the course heirarchy being in the HTTP cache for offline support. If the HTTP cache gets automatically cleaned by the system because of this change, it means the user will lose offline support (until they open the course hierarchy again).

To solve this, we should not rely on the HTTP cache for offline support, and instead ensure that we have the data we need (in non-cache files, or in the SQL database). We may want to implement that before addressing this issue.

Brian Guertin
August 17, 2016, 8:06 PM

"If you'd like to cache some data, rather than store it persistently, you should use getCacheDir() to open a File that represents the internal directory where your application should save temporary cache files.

When the device is low on internal storage space, Android may delete these cache files to recover space. However, you should not rely on the system to clean up these files for you. You should always maintain the cache files yourself and stay within a reasonable limit of space consumed, such as 1MB. When the user uninstalls your application, these files are removed."





Fix versions




Story Points



Brian Guertin