expire « ehcache « Java Enterprise Q&A





1. Retrieving expired objects in Ehcache    stackoverflow.com

I'd like to implement the following algorythm above Ehcache :

  • try to get an element from the cache
  • if the element is not expired
    • serve the value
  • else
    • serve the expired value
    • refresh the element in the ...

2. what mean a element expired in Ehcache    stackoverflow.com

when I use the Ehcache ,there is something that I can't understand,what means that a elements is expired,if a element is expired it means that the cache will clear the ...

3. If my Ehcache is configured with a TTL, do I need to check if a retrieved Element is expired?    stackoverflow.com

I can't find this anywhere in the Ehcache docs. Right now I'm using this code to create and configure my Cache:

// Groovy syntax

def cacheConfig = new CacheConfiguration('stats', 1)
cacheConfig.timeToLiveSeconds = 2

def cache = ...

4. Make EHCache expire elements which have not been accessed in a specific way    stackoverflow.com

I'm trying to get EHCache to mark cache elements as expired if they have not been accessed in a particular way, within a specified amount of time. I have an automated cache-refresher ...

5. Ehcache how to remove keys when element is expired?    stackoverflow.com

I'm trying to get only valid objects from the cache. if I do List list = cache.getKeys(); it will return keys that are expired too. I though of adding a ...