What do these terms mean in the context of hibernate?
posted 12 years ago
The first-level cache is associated with a session. Hibernate needs this to insure, for example, that if your query (or queries) return the same row more than once, you don't end up with multiple copies of the same object in the same Session.
The second-level cache is shared between different sessions. As usual with shared caches, consistency is an issue. The simplest use is for objects that change rarely or never.