• Bug
  • Status: New
  • 2 Major
  • Resolution:
  • ehcache-core
  • drb
  • Reporter: casasola
  • February 08, 2017
  • 0
  • Watchers: 2
  • April 17, 2017


Making a search against an in-memory cache the
net.sf.ehcache.store.BruteForceSearchManager#executeQuery is not taking into account the element’s expiry returning elements that isExpired() method sees as expired.

Cache is configured with eternal=false and timeToIdle/timeToLive have valid values.


Louis Jacomet Jacomet 2017-04-14

Just to understand better what you are describing, can you elaborate your test?

Am I right in reading that you get an {{Element}} from the search result and then invoke {{Element.isExpired()}}?

marcos casasola 2017-04-17

Hi, basically I have cache configured as searcheable for several attributes, when I execute a query against this cache I’m getting expired elements. So, as you said, if I issue a element.isExpired() over the returned elements I get True. Let me know if at least an unit test is needed to understand better.