It's not a secret anymore!*
The moose likes Object Relational Mapping and the fly likes Hibernate second level cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate second level cache" Watch "Hibernate second level cache" New topic
Author

Hibernate second level cache

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
I came across following statement:

Second level cache is an optional cache and first-level cache(session) will always be consulted before any attempt is made to locate an object in the second-level cache.


Suppose i have enabled 2nd level cache, using EHCache. Now i save an object O by saying session.save(O). The object O is stored in session. Will it also be stored in second level cache.

Thanks in advance.


SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Hibernate second level cache
 
Similar Threads
Hibernate Second Level Cache
Advantages of ORM?
Loading proxy without hitting database
regarding QueryCache
Difference between Session Cache for load and query cache ?