JakeWharton / DiskLruCache

Java implementation of a Disk-based LRU cache which specifically targets Android compatibility.
http://jakewharton.github.io/DiskLruCache
Apache License 2.0
5.79k stars 1.18k forks source link

Add a lightweight contains( key ) method for quickly checking if a key exists in the cache #54

Open Wavesonics opened 10 years ago

Wavesonics commented 10 years ago

Calling get( key ) can be too expensive in some cases as a check if something is in the cache. Providing a light weight, (non-synchronized?) way of checking if a key exists in lruEntries would be very convenient.