14

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?

Tobbe
  • 1,787
  • 3
  • 19
  • 37
Basbous
  • 3,904
  • 4
  • 33
  • 61

2 Answers2

16

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.

pawelzieba
  • 16,024
  • 3
  • 43
  • 72
0

This link should help you understand it a bit:

http://www.guypo.com/understanding-mobile-cache-sizes/

Michael Oryl
  • 19,602
  • 14
  • 73
  • 113
Hemant Menaria
  • 691
  • 1
  • 7
  • 17