How to implement ConcurrentHashMap with features similar in LinkedHashMap?

后端 未结 6 763
离开以前
离开以前 2021-02-04 05:14

I have used LinkedHashMap with accessOrder true along with allowing a maximum of 500 entries at any time as the LRU cache for data. But due to scalabil

6条回答
  •  一向
    一向 (楼主)
    2021-02-04 05:46

    Have you tried using one of the many caching solutions like ehcache? You could try using LinkedHashMap with a ReadWriteLock. This would give you concurrent read access.

提交回复
热议问题