Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maximum cache size

Tags:

android

I am planning to save an opened file to the android cache. But before I start I want to know the maximum size of the cache file, and how can I manage the cache size according to device?

like image 286
Basbous Avatar asked Jan 12 '12 09:01

Basbous


1 Answers

Doc says that:

These files will be ones that get deleted first when the device runs low on storage. There is no guarantee when these files will be deleted.

and there is also a suggestion:

Note: you should not rely on the system deleting these files for you; you should always have a reasonable maximum, such as 1 MB, for the amount of space you consume with cache files, and prune those files when exceeding that space.

So, as I understand, cache can be as big as free memory on storage.

like image 62
pawelzieba Avatar answered Oct 15 '22 07:10

pawelzieba