2

I'm using Java Caching System (JCS - https://commons.apache.org/proper/commons-jcs/ )

I'd like to know the difference between MaxLife and MaxLifeSeconds

MaxLife: If you specify that elements within a region are not eternal, then you can set the max life seconds. If this is exceeded the elements will be removed passively when a client tries to retrieve them. If you are using a memory shrinker, then the items can be removed actively.

MaxLifeSeconds: If elements are not eternal, this option defines the maximum life of each object before it is removed. If the memory shrinker is running, objects are removed by the shrinker; if not, they are removed when they're accessed. This option defaults to -1, which disables the option.

These definitions seem nearly the same.

Is it just a change in name?

mycowan
  • 993
  • 8
  • 18

1 Answers1

0

My guess is that MaxLifeSeconds is depricated.

With JCS 2.0-beta-1 I have:

    CacheAccess.getCacheControl().getElementAttributes().setMaxLife(arg0);
    CacheAccess.getCacheControl().getElementAttributes().getMaxLife();

And JCS documentation lists MaxLife as a Region (Element) Property

JCS RegionProperties

In an old mailing list archive (Thu, 11 May 2006 ) I find a reference to MaxLifeSeconds in a message about an upgrading to JCS version 1.2.7.0

jakarta-jcs-users mailing list archives

mycowan
  • 993
  • 8
  • 18