如何完全禁用nHibernate中的缓存? [英] How do I totally disable caching in nHibernate?
本文介绍了如何完全禁用nHibernate中的缓存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何完全禁用nHibernate中的缓存?
How do I totally disable caching in nHibernate?
推荐答案
使用IStatelessSession绕过第一级缓存: http://darioquintana.com.ar/blogging/?p=4
Use the IStatelessSession to bypass the first level cache: http://darioquintana.com.ar/blogging/?p=4
为了使用二级缓存,您必须显式配置它.否则,您将不会使用它.
In order to use the second level cache you must explicitly configure it. You will not use it if you don't.
您还可以在映射中关闭延迟加载. lazy = false.
You can also turn off lazy loading in your mappings. lazy=false.
这篇关于如何完全禁用nHibernate中的缓存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文