Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NHibernate cache defaults

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?

like image 237
rovsen Avatar asked May 03 '26 05:05

rovsen


1 Answers

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

like image 196
Simon Bartlett Avatar answered May 05 '26 18:05

Simon Bartlett



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!