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

Description

I was attempting to work with a large expire time TTL of 2592000 (30 days) for a disk-persistent cache, but the expire time was always returning “expired”. Upon investigation, I believe it might be due to the net.sf.ehcache.Element.ONE_SECOND constant, which is an int. When used
as

long ttlExpiry = creationTime + timeToLive * ONE_SECOND

in the getExpirationTime() method, this causes the integer result of (timeToLive * ONE_SECOND) to overflow into a negative value.

Changing the ONE_SECOND constant into a long fixed the problem for me. Sourceforge Ticket ID: 1548314 - Opened By: msqr - 29 Aug 2006 04:09 UTC

Comments

Sourceforge Tracker 2009-09-21

Logged In: YES user_id=693320

Matt

That one must have got introduced when I switched over to Element based expiry.

Thanks for finding it.

The fix is in trunk and will be in ehcache-1.2.3.

Greg Comment by: gregluck - 1 Sep 2006 07:45 UTC

Fiona OShea 2009-09-22

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