【发布时间】:2012-05-24 14:18:05
【问题描述】:
我正在使用 Spring + Ehcache 作为我的缓存层。 (通过代理)
我想知道您是否可以将“findAll”结果和“findById”结果缓存在同一个缓存中,然后 CacheEvict 特定项目和“findAll”结果(保持项目的其余部分保持不变)并在更新和再次“findById”时将其加载回缓存?
(或者另一种方法是将 findAll 和 findById 保存在 2 个缓存中,并在更新 CacheEvict allEntries 时为 findAll 缓存和 findById 缓存上的特定项目)
这可能吗?
【问题讨论】: