| Author |
Query when Using EHCache mechanism
|
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
"Objects can be evicted from the cache by calling the Session.evict() method . "
I am having a Query with respect to above statement .
My understanding with respect to above statement is not applicabe if one uses Second Level Cache such as EHCache .
AS session is only associated with First Level Cache
Please share your ideas
|
Save India From Corruption - Anna Hazare.
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Session.evict() evicts stuff from the Session, and the Session is the first level cache. It doesn't evict stuff from the second level cache, hence all the evict methods in the SessionFactory class. See the JavaDocs.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
Thank you Paul ,
so i think using SessionFactory.evict is the solution for this .Am i Right ??
The ehcache.xml looks like this
-------------------------
Please tell how exactly the Mydir (above path) looks like exactly , and what is the life time of it ?
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
I'm afraid I don't use EHCache. This sort of stuff must be covered in their documentation though. Hacve you read through this?
|
 |
 |
|
|
subject: Query when Using EHCache mechanism
|
|
|