Second level caching in Hibernate: when it works?
I correctly understand that the second-level cache works for entities (or classes) only when an entity extracted directly from database (for example through method .load (..)) or when the entity is included in the collection of another entity (through links one-to-many, many-to-many and etc.)?
When the entities retrieve through the Criteria API (with a complex request inside), the cache is not used? Here I mean not hql, namely Criteria API, for example, using "Junction".