Using Guava for high performance thread-safe caching

前端 未结 2 530
遥遥无期
遥遥无期 2021-02-18 17:59

I am trying to implement a high performance thread-safe caching. Here is the code I have implemented. I don\'t want any on demand computing. Can I use cache.asMap() and retrieve

2条回答
  •  春和景丽
    2021-02-18 18:29

    If you want high performance, why don't you instanciate the Cache statically instead of using a synchronized getInstance()?

提交回复
热议问题