Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Google Developer 的 API 中有一个 trimToSize() 方法,我找不到/使用。如何清除或减小 LRU 缓存的大小?
public final void evictAll ()
在 API 级别 12 中添加
清除缓存,调用entryRemoved(boolean, K, V, V)每个已删除的条目。
entryRemoved(boolean, K, V, V)
使用此方法。