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,825
  • 3
  • 21
  • 37
Basbous
  • 3,927
  • 4
  • 34
  • 62

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,082
  • 3
  • 46
  • 72
0

This link should help you understand it a bit:

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

Michael Oryl
  • 20,856
  • 14
  • 77
  • 117
Hemant Menaria
  • 701
  • 1
  • 7
  • 17