How to clean LRUCache androids

There is a trimToSize () method in the Google Developer API that I cannot find / use. How to clear or reduce the size of my LRU cache?

+3
source share
1 answer
public final void evictAll ()

Added to API Level 12

Clear the cache by calling entryRemoved(boolean, K, V, V)for each deleted entry.

Use this method.

+7
source

All Articles