【问题标题】:i want to use same cache using ehcache for all requests of different clients我想使用 ehcache 对不同客户端的所有请求使用相同的缓存
【发布时间】:2013-07-13 05:43:23
【问题描述】:

eh-cache 为每个访问 Web 服务的客户端使用不同的缓存。我正在使用它。我想为所有客户端使用相同的缓存。我需要配置什么,以便它将使用相同的缓存,而不是为每个客户端创建新的缓存。现在它正在为每个客户端创建新的缓存。

【问题讨论】:

标签: web-services jakarta-ee caching ehcache


【解决方案1】:

您应该使用在 eh-cache 客户端实例之间共享公共缓存的分布式 eh-cache。为此,您需要使用 eh-cache 的 Terracotta 实现来更新您的 eh-cache jar 文件。此外,您的 ehcache.xml 配置必须更新以启用 terracotta。 见here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-01-12
    • 2014-08-04
    • 1970-01-01
    • 2019-03-31
    • 2019-04-04
    • 1970-01-01
    • 2023-03-16
    相关资源
    最近更新 更多