In the API of Google Developer there is a trimToSize() Method, that I can't find / use. How do I clear or reduze the size of my LRU Cache ?

有帮助吗?

解决方案

public final void evictAll ()

Added in API level 12

Clear the cache, calling entryRemoved(boolean, K, V, V) on each removed entry.

Use this method.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top