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.
我得到了一个由两个应用程序修改的表。其中之一是使用休眠。如何禁用该表的缓存?可以在映射文件中完成吗?
假设您为会话工厂启用了 L2 缓存(通过cache.use_second_level_cache),您应该能够<cache>在映射文件中为该模型排除该元素。
cache.use_second_level_cache
<cache>
默认情况下不启用缓存。
如果您指的是“一级缓存”,即Session,那么您的使用模式有问题。