• Bug
  • Status: Open
  • 2 Major
  • Resolution:
  • ehcache-core
  • Reporter: abhinav
  • June 30, 2010
  • 0
  • Watchers: 1
  • October 11, 2011

Description

Configure a cache with overflowToDisk=”true”, eternal=”false”, timeToIdleSeconds=”120”, timeToLiveSeconds=”300”, diskExpiryThreadIntervalSeconds=”360”, diskPersistent=”false”.

The observed behavior is that elements get evicted, as eternal is set to false, not only from disk storage but also from memory store.

The Ehcache documentation mentions that disk expiry thread processes only disk storage and elements are not reaped from memory storage.

Comments

Chris Dennis 2010-06-30

We had some internal discussion amongst the Ehcache developers here at Terracotta and there was some confusion around this issue. We don’t believe there is a code bug here (if anything it might be a documentation bug), however we would appreciate some clarification from you on a few points to make sure.

The way things are supposed to work given the settings you specified are: the memory store has inline eviction which prevents the return of TTI/TTL expired elements; the memory store will overflow elements to disk when the memory store becomes full; the disk store has an eviction thread which purges expired elements from disk to prevent it from growing indefinitely.

1) Where exactly in the documentation are you reading the statement about there being no TTI/TTL eviction from the memory store? 2) What behavior do you expect to see from the cache given your reading of the documentation? 3) What behavior do you actually see from the cache? (a code example with failing assertions would be ideal)

Thanks,

Chris

Fiona OShea 2010-06-30

Waiting for feedback from Reporter

Abhinav Sarkari 2010-07-06

Kindly check the following link : http://ehcache.org/documentation/storage_options.html

Expiry strategy is specified only for Disk Storage.

Even if expiry thread works on memory storage, the documentation doesn’t mention the time/schedule interval for the thread run and on what basis are the elements from memory storage expired?

Fiona OShea 2010-07-06

Can you fix the doc?

Fiona OShea 2011-02-22

MOving unresolved P2 jiras to Ulloa - to be reviewed by Chris, Fiona, Greg soon