H4cK
V2EX  ›  问与答

有没有什么 Java lib 能自己模拟一个简单的 redis 服务?

  •  
  •   H4cK · Aug 2, 2018 · 1743 views
    This topic created in 3033 days ago, the information mentioned may be changed or developed.
    由于某些原因不能使用 redis,但是又要弄一个简单的缓存服务,有没有现成的开源 library 可以用在这种场景下吗?
    3 replies  •  2018-08-02 10:25:14 +08:00
    auin
    auin
    Aug 2, 2018
    1
    java 中比较流行的 cache 方案有:ehcahce, Guava,Spring 也有内置,在简单点用 ConcurrentHashMap 自己构造个不也是一个类的事情嘛。但要说 api 完全一致哪怕部分功能一致那肯定是没有的
    amon
    amon
    Aug 2, 2018
    2
    guava cache
    H4cK
    H4cK
    OP
    Aug 2, 2018
    3
    多谢多谢。看起来 guava 是个好解决方案,对它还停留在一堆 collections 方法的认识层面。。原来现在这么多功能了,赞
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   990 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:17 · PVG 07:17 · LAX 15:17 · JFK 18:17
    ♥ Do have faith in what you're doing.