H4cK
V2EX  ›  问与答

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

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