Overview of Disk LRU Cache functionality
masterDisk LRU Cache is a filesystem-based cache that uses a bounded amount of space.
Key Constraints:
- Keys: Must be strings matching the regex
[a-z0-9_-]{1,120}. - Values: Byte sequences (accessible as streams or files) with lengths between
0andInteger.MAX_VALUEbytes. - Directory: The cache uses a specific directory on the filesystem. This directory must be exclusive to the cache; multiple processes must not use the same directory simultaneously.
- Space Management: The cache limits the total bytes stored. When the limit is exceeded, entries are removed in the background. Note that the limit is not strict and does not include filesystem overhead or the cache journal; set a conservative limit for space-sensitive applications.
- Android Compatibility: This implementation specifically targets Android.