Reputation: 5022
Is query caching/entity caching are related to both 1st and 2nd level caches or just to 2nd level cache?
Which is coming by default: query caching or entity caching?
Upvotes: 3
Views: 355
Reputation: 2030
The 1st level cache is enabled by default and provides entity caching for an instance of a NH session. Each individual NH session has it's own 1st level cache.
The 2nd level cache (which has to be configured) provides entity caching across sessions, and also provides query caching when asked.
This link has more information: http://nhibernate.info/doc/nhibernate-reference/caches.html
Upvotes: 7