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.
Sure I'll give it a look and update accordingly.
, , - 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!
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
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.
"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."