You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Sahib Bin Mahboob Ron <sa...@cefalo.com> on 2017/01/23 09:48:25 UTC
JCS : element expires sooner than configured
Hi,
I am trying to configure a JCS using the following configuration:
# DEFAULT CACHE REGION
jcs.default=
jcs.default.cacheattributes=
org.apache.commons.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1000
jcs.default.cacheattributes.MemoryCacheName=
org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLife=300
jcs.default.elementattributes.IsSpool=false
While it is expected to expire the item in 300 seconds as per MaxLife
configuration, it does not work properly in following steps:
1. Putting a key "aKey" for the first time in cache: It works perfectly.
2. "aKey" expires after 300 seconds.
3. Put "aKey" again on the cache.
4. It expires immediately.
Am I missing any configuration or this is the way it should behave?
- Sahib
Re: JCS : element expires sooner than configured
Posted by Thomas Vandahl <tv...@apache.org>.
Ouch, that hurt. I'm sorry, this is a problem with ElementAttributes.clone() not updating createTime. I fixed it in trunk. Could you try if it works for you?
Bye, Thomas
-- tv
> Am 23.01.2017 um 10:48 schrieb Sahib Bin Mahboob Ron <sa...@cefalo.com>:
>
> Hi,
>
> I am trying to configure a JCS using the following configuration:
>
> # DEFAULT CACHE REGION
>
> jcs.default=
> jcs.default.cacheattributes=
> org.apache.commons.jcs.engine.CompositeCacheAttributes
> jcs.default.cacheattributes.MaxObjects=1000
> jcs.default.cacheattributes.MemoryCacheName=
> org.apache.commons.jcs.engine.memory.lru.LRUMemoryCache
>
> jcs.default.elementattributes=org.apache.commons.jcs.engine.ElementAttributes
> jcs.default.elementattributes.IsEternal=false
> jcs.default.elementattributes.MaxLife=300
> jcs.default.elementattributes.IsSpool=false
>
>
> While it is expected to expire the item in 300 seconds as per MaxLife
> configuration, it does not work properly in following steps:
>
> 1. Putting a key "aKey" for the first time in cache: It works perfectly.
> 2. "aKey" expires after 300 seconds.
> 3. Put "aKey" again on the cache.
> 4. It expires immediately.
>
> Am I missing any configuration or this is the way it should behave?
>
> - Sahib
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org