Is there a SoftHashMap in Java?

后端 未结 7 1954
盖世英雄少女心
盖世英雄少女心 2020-12-12 14:54

I know there is a WeakHashMap in java.util, but since it uses WeakReferences for everything, which is only referenced by this Ma

7条回答
  •  北海茫月
    2020-12-12 15:22

    Have you considered using an LRUMap instead of a soft HashMap? You get more control over what gets stored (or at least, how much).

提交回复
热议问题