File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EhCache and the fly likes GC problems Ehcache where elements in the cache are eternal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Caching » EhCache
Bookmark "GC problems Ehcache where elements in the cache are eternal" Watch "GC problems Ehcache where elements in the cache are eternal" New topic
Author

GC problems Ehcache where elements in the cache are eternal

Mr. Vivek Srivastav
Greenhorn

Joined: Nov 24, 2006
Posts: 2
I've declared a cache with elements in the cache as eternal & after a fixed interval I overwrite the cache with elements .

so my code looks like ,


where maxElementsInMemory = 10000 , overflowToDisk = false , eternal =true , timeToLiveSeconds =0 , timeToIdleSeconds =0

so say at load time i get some data and add it to cache eg.


And after say 5 mins I again overwrite the data (again with same values hopefully ) .


So after 5 minutes after the execution of line 3 above does the previous element in the cache (made in line 2 ) get overwritten and so does it get eligible for garbage collection ?



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GC problems Ehcache where elements in the cache are eternal
 
Similar Threads
[EHCACHE] Problem defaultCache and cache in distributed environment
What is the proper configuration for OpenJPA using ehcache as a distributed second level cache?
Caching
Renamed "ehcache.xml" to "myehcache.xml" - Cannot find the declaration of element 'ehcache'
EHCache problems