【问题标题】:How can I specify Ehcache settings with Play 1.2.4如何使用 Play 1.2.4 指定 Ehcache 设置
【发布时间】:2012-04-16 05:51:54
【问题描述】:

是否可以使用 Play 框架从 application.conf 设置 Ehcache 属性?

即在 application.conf 中我可以指定如下内容:

timeToLiveSeconds=36000

【问题讨论】:

    标签: playframework ehcache playframework-1.x


    【解决方案1】:

    https://gist.github.com/oscarrenalias/5063249 的要点建议将 ehcache.xml 放在 conf/ 文件夹中,但我不知道这是否适用于 Play 1。

    【讨论】:

      【解决方案2】:

      据我所知,这是不支持的。 Play 1.2.4 支持的配置选项记录在here 中,列表中没有类似的内容。从 Play 的 Cache API 中也找不到 Ehcache 特定的选项,因为它应该为缓存功能提供通用接口,独立于实际实现(Ehcache、Memcached)。

      【讨论】:

      • 感觉不对,因为可以指定memcached属性!我正在尝试为所有缓存对象指定最大 TTL 值,这对于 memcached 是可能的。为什么不用ehcache?
      猜你喜欢
      • 1970-01-01
      • 2015-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多