具有隐式事务的nhibernate二级缓存 [英] nhibernate second level cache with implicit transactions

查看:93
本文介绍了具有隐式事务的nhibernate二级缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读到,除非使用(显式)事务,否则我们将无法使用二级缓存-但是,我们使用的是Informix系统-由于目前无法控制的原因;一个会计系统-我们必须先使用事务,然后才能转移到SQL Server.

I've read that we can't use 2nd level caching until we use (explicit) transactions - however, we are using a an Informix system - which for reasons currently beyond our control; an accounting system - we cannot use transactions until we move to SQL server.

二级缓存可以通过缓存不经常更改的数据来极大地提高我们的性能-可以使用任何方式将其与隐式事务一起使用吗?

Second level caching could greatly improve our performance by cache data that doesn't changed often - is there any way at all to use it with implicit transactions?

推荐答案

否,NH在没有事务的情况下不会使用缓存.但是我真的很想知道为什么不能使用事务,这不仅对于NHibernate,而且对于关系数据库的任何使用都是一个好习惯.

No, NH won't use the cache without a transaction. But I really wonder why you can't use transactions, which is a good practice not only for NHibernate, but for ANY usage of relational databases.

这篇关于具有隐式事务的nhibernate二级缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆