• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

GC problems Ehcache where elements in the cache are eternal

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ?



 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic