Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
. 缓存对象值是休眠实体,记住它也存储在 2 级缓存中。当我们看到 Ehcache 统计数据时,它总是对象数的两倍。我们以为我们将缓存设置为真,但似乎键存在但值消失了,我们怀疑实体已从休眠 l2 缓存中逐出。复产真的好难
问题已确定。
我们的应用程序也使用休眠查询级缓存和二级缓存。在启动时,我们有一个配置(缓存在查询级别和二级缓存)缓存到我们自己的缓存中(使用 hCache)。当hibernate 执行作为实体之一提交的本机查询时,hibernate 使大多数实体的二级缓存无效。