问题
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?
回答1:
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.
来源:https://stackoverflow.com/questions/10226461/nhibernate-second-level-cache-with-implicit-transactions