You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by "Lin, Shan" <SL...@collegeboard.org> on 2006/05/11 15:35:20 UTC

Configuration of non-shrinkable LRU memory cache

I am using JCS 1.2.7.0.  What is the right configuration to have a
non-shrinkable LRU memory cache?
I try some combination, but still not certain about what is the right
configuration.

Could someone provide a reference configuration for this type of usage?
Thanks,

Shan Lin


Re: Configuration of non-shrinkable LRU memory cache

Posted by Eddie Liu <ei...@gmail.com>.
We are using the following configuration and it's been working fine except
for a NoClassDefFoundError that we got on application startup (most likely a
class loader issue).  It doesn't seem to affect the caching though.

Hope that helps.

Eddie


##############################################################
################## DEFAULT CACHE REGION #####################
# sets the default aux value for any non configured caches

jcs.default=DC
jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.default.cacheattributes.MaxObjects=1200
jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.default.cacheattributes.UseMemoryShrinker=false
jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=7200
jcs.default.cacheattributes.ShrinkerIntervalSeconds=60
jcs.default.cacheattributes.MaxSpoolPerRun=500
jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes
jcs.default.elementattributes.IsEternal=false
jcs.default.elementattributes.MaxLifeSeconds=10
jcs.default.elementattributes.IdleTime=10
jcs.default.elementattributes.IsSpool=true
jcs.default.elementattributes.IsRemote=true
jcs.default.elementattributes.IsLateral=true


##############################################################
################ CACHE REGIONS AVAILABLE ####################

#-- You may configure a particular region, in this example, set the
#-- special configuration for region 'ABC'

# Regions preconfigured for caching

jcs.region.ABC=DC
jcs.region.ABC.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes
jcs.region.ABC.cacheattributes.MaxObjects=1200
jcs.region.ABC.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache
jcs.region.ABC.elementattributes.IsEternal=false
jcs.region.ABC.elementattributes.MaxLifeSeconds=7200
jcs.region.ABC.elementattributes.IdleTime=1800
jcs.region.ABC.elementattributes.IsSpool=true
jcs.region.ABC.elementattributes.IsRemote=true
jcs.region.ABC.elementattributes.IsLateral=true
jcs.region.ABC.cacheattributes.UseMemoryShrinker=false
jcs.region.ABC.cacheattributes.MaxMemoryIdleTimeSeconds=3600
jcs.region.ABC.cacheattributes.ShrinkerIntervalSeconds=60
jcs.region.ABC.cacheattributes.MaxSpoolPerRun=500


##############################################################
################# AUXILIARY CACHES AVAILABLE #################

# Primary Disk Cache -- faster than the rest because of memory key storage
jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory
jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes
jcs.auxiliary.DC.attributes.DiskPath=/usr/opt
jcs.auxiliary.DC.attributes.MaxPurgatorySize=10000
jcs.auxiliary.DC.attributes.MaxKeySize=10000
jcs.auxiliary.DC.attributes.OptimizeAtRemoveCount=300000
jcs.auxiliary.DC.attributes.MaxRecycleBinSize=7500

Re: Configuration of non-shrinkable LRU memory cache

Posted by Aaron Smuts <as...@yahoo.com>.
The memory cache configuration options are documented
here:

http://jakarta.apache.org/jcs/RegionProperties.html

The default value for the memory shrinker is false. 
The only way you could have it on is if you added a
line much like this:

jcs.default.cacheattributes.UseMemoryShrinker=true

The name of the property that turns the memory
shrinker on should be self evident: it's
"UseMemoryShrinker".

Cheers,

Aaron

--- "Lin, Shan" <SL...@collegeboard.org> wrote:

> I am using JCS 1.2.7.0.  What is the right
> configuration to have a
> non-shrinkable LRU memory cache?
> I try some combination, but still not certain about
> what is the right
> configuration.
> 
> Could someone provide a reference configuration for
> this type of usage?
> Thanks,
> 
> Shan Lin
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org