• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

An unexpected side effect of calling Ehcache.evictExpiredElements() is that it updates the memoryStoreHitCount and missCountExpired statistics.

Looking at the code Cache.evictExpiredElements() calls searchInMemoryStore(Object, boolean) and passes false for the boolean to disable statistics updating but that value only seems to apply to the get call and not the incrementing of memoryStoreHitCount and missCountExpired later in the call.

We’re using Ehcache.evictExpiredElements() in a timer to periodically flush expired objects from the caches and having the stats being affected by the calls makes checking on actual cash usage stats hard to read.

If we don’t want to change the existing behavior of Cache.evictExpiredElements() perhaps adding a Cache.quietEvictExpiredElements() method to result in flushing of expired entries with no stats updating. Sourceforge Ticket ID: 1897111 - Opened By: edalquist - 19 Feb 2008 17:53 UTC

Comments

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira