Canhibernatefirstlevelcachingbedisabled?Incaseitcantbedisabled,arethereanyworkaroun Can hibernate first level caching be disabled? Incase it can't be disabled, are there any work arounds? 可以禁用hibernate一级缓存吗?如果它无法禁
Can hibernate first level caching be disabled? Incase it can't be disabled, are there any work arounds?
可以禁用hibernate一级缓存吗?如果它无法禁用,有任何解决方法吗?
1 个解决方案
#1
2
Hibernate first level cache is associated with the Session object. Hibernate first level cache is enabled by default and there is no way to disable it. However hibernate provides methods through which we can delete selected objects from the cache or clear the cache completely. Any object cached in a session will not be visible to other sessions and when the session is closed, all the cached objects will also be lost.
Hibernate第一级缓存与Session对象相关联。默认情况下启用Hibernate第一级缓存,无法禁用它。但是,hibernate提供了一些方法,通过这些方法我们可以从缓存中删除所选对象或完全清除缓存。在会话中缓存的任何对象对其他会话都不可见,并且当会话关闭时,所有缓存的对象也将丢失。
【本文转自:国外高防服务器 http://www.558idc.com/usa.html转载请说明出处】