As far as I know Hibernate let's you configure entities and collections to be stored in a second-level cache.
When does Hibernate try to read these cached entities from the second-level cache and when does it hit the DB? Does Hibernate only read from the second-level cache when loading entities by calling Sesssion.get()
and when initializing proxies (including collections)? Does Hibernate ever hit the second-level cache when executing HQL- or Criteria-Queries?
Examples?