【问题标题】:Is there any way to configure ehcache to return an expired object if it is unable to obtain an updated version?如果无法获取更新版本,是否有任何方法可以将 ehcache 配置为返回过期对象?
【发布时间】:2017-03-27 22:19:11
【问题描述】:

讨论它的类似线程 - https://sourceforge.net/p/ehcache/discussion/322278/thread/cfe24a99/ 这个问题是在 2009 年添加的,我不知道如何将该解决方案与基于注释的 ehcache 实现集成。

【问题讨论】:

    标签: java spring caching ehcache


    【解决方案1】:

    不,默认情况下您不能在 Ehcache 中执行此操作,无论是 2.x 还是 3.x。

    您将不得不装饰缓存 (Ehcache 2.x) 或包装您的值 (Ehcache 3.x) 并自行设计您想要的内容。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-02
      • 2019-10-13
      • 1970-01-01
      • 2015-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多