Meaning that I would like to load a set of objects and have the cache used exclusively when different queries that operate on that data object or set of objects instead of letting queries 'leak back' to the database. If the answer is yes, which cache provider offers this or do all of them and what configuration parameters do i need to be taking advantage of?
views:
36answers:
2
A:
Can you use the Microsoft Caching Application Block as the NHibernate Level 2 Cache?
Preet Sangha
2009-05-01 04:02:10
A:
I think if you cache the queries that you need in the query cache as well as all those entities in the second level cache (query cache only stores identifiers) then yes, it will act as a "replacement" for the database as long as the entities are hydrated to the extent that you need them in the second level cache.
Any updates to the tables in the session will force a refresh of the query cache though, and any lazy loaded collections that aren't hydrated will cause queries to happen when they're accessed.
Brian Yarger
2009-05-01 04:10:24