In NHibernate
you can easily benefit from first level cache when using Load
or Get
methods. But what about ICriteria
, HQL
, Linq-to-NHibernate
and QueryOver
? Do they use first level cache too?
相关问题
- jsp caching tag library
-
NHibernate Query
with detached criteria… - Fluent NHibernate automap PostGIS geometry type
- Using NHibernate to execute DDL statements
- How can we cache HLS video url once streamed
相关文章
- Fluent NHibernate — Saving Entity with Composite K
- Is there a google API to read cached content? [clo
- Is this the right way of using ThenFetch() to load
- Can Persistence Ignorance Scale?
- AWS API Gateway caching ignores query parameters
- Check if url is cached webview android
- WebView's LOAD_NO_CACHE setting still saves fi
- How to find if a referenced object can be deleted?
No, as I understand they don't. They use only second level cache. Firs level cache is only for
Get
andLoad
.They use it for returning entities, but the queries go straight to the db unless you use the second level cache.
Consider this:
Two queries are executed (one for the Get, one for the Query), but both variables contain the same object reference.
Now, if you enable the 2nd level cache, query caching, and specify caching for the query:
Only one query will be executed.