I'm setting "time to live" value for an individual cache item, but it 
doesn't work and it takes TTL value set for that Cache Region in which 
cache item is added.
So, in this scenraio, cache item expires after "100" secs whereas I set to 
expire after "10" secs. 

Here is code snippet which is putting cache item:
.............
         JCS cache = getCacheForRegion(regionName);
         ElementAttributes attr = new ElementAttributes();
         attr.setMaxLifeSeconds(10);
         cache.put(name, obj, attr);
................


and here is cache.ccf settings:

# DEFAULT CACHE REGION

# sets the default aux value for any non configured caches
jcs.default=
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=100
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLifeSeconds=1000
jcs.default.elementattributes.IdleTime=1
jcs.default.elementattributes.IsSpool=false
jcs.default.elementattributes.IsRemote=false
jcs.default.elementattributes.IsLateral=false


# LRU Memory Cache
jcs.region.eplatform_primary_memory_cache=
jcs.region.eplatform_primary_memory_cache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.region.eplatform_primary_memory_cache.cacheattributes.MaxObjects=100000
jcs.region.eplatform_primary_memory_cache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.eplatform_primary_memory_cache.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.region.eplatform_primary_memory_cache.elementattributes.IsEternal=false
jcs.region.eplatform_primary_memory_cache.elementattributes.MaxLifeSeconds=1000
jcs.region.eplatform_primary_memory_cache.elementattributes.IdleTime=1
jcs.region.eplatform_primary_memory_cache.elementattributes.IsSpool=false
jcs.region.eplatform_primary_memory_cache.elementattributes.IsRemote=false
jcs.region.eplatform_primary_memory_cache.elementattributes.IsLateral=false



*********************************************************************************
Important Note
This email (including any attachments) contains information which is 
confidential and may be subject to legal privilege.  If you are not 
the intended recipient you must not use, distribute or copy this 
email.  If you have received this email in error please notify the 
sender immediately and delete this email. Any views expressed in this 
email are not necessarily the views of AXA.   Thank you.
*********************************************************************************

Reply via email to