【发布时间】:2012-12-06 05:45:59
【问题描述】:
我正在使用 ehcache 2.5.4。
我有一个对象需要全天缓存并在每天上午 00:00 用新值刷新。
目前使用 ehcache 配置,我只能设置生存时间和空闲时间,但这取决于我创建对象的时间或使用它的时间。即:
<cache
name="cache.expiry.application.date_status"
maxElementsInMemory="10"
eternal="false"
timeToIdleSeconds="60"
timeToLiveSeconds="50" />
有没有办法让 ehcache 根据特定时间使特定缓存过期。
【问题讨论】:
-
不可能直接。使用外部 CRON 触发器 (quartz-scheduler?) 手动清除缓存怎么样?
标签: java hibernate caching ehcache