views:

34

answers:

1

Does any body know how if there is a way to tell if an entity is already in the NHibernate second level cache?

Ideally what I'd like to be able to do is pass the identifer of an entity to NH and find out if it's already in the second level cache.

A: 

Caches are supposed to be transparent to the code using them.

If you enable entity and query caching, and cache the query that generates your graph, it will be retrieved from cache without additional work.

Diego Mijelshon