Is there a SoftHashMap in Java?

后端 未结 7 1975
盖世英雄少女心
盖世英雄少女心 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:35

    Apache Shiro comes with a SoftHashMap designed for caching. Its based on the article posted by jb above and licensed under Apache v2. You can find the documentation here and the source code here.

提交回复
热议问题