Property |
Description |
Required |
Default Value |
MaxObjects |
The maximum number of items allowed in memory. Eviction of elements
in excess of this number is determined by the memory cache. By default
JCS uses the LRU memory cache.
|
Y |
n/a |
MemoryCacheName |
This property allows you to specify what memory manager you would like to use.
You can create your own memory manager by implementing the org.apache.jcs.engine.memory.MemoryCache interface.
Alternatively, you can extend the org.apache.jcs.engine.memory.AbstractMemoryCache class. Several different
memory caches are available: two LRU implementations, an LFU, and an adaptive replacement algorithm.
|
N |
org.apache.jcs.engine.memory.lru.LRUMemoryCache |
UseMemoryShrinker |
By default, the memory shrinker is shared by all regions that use the
LRU memory cache. The memory shrinker iterates through the items in
memory, looking for items that have expired or that have exceeded their max
memory idle time.
|
N |
false |
MaxMemoryIdleTimeSeconds |
This is only used if you are using the memory shrinker. If
this value is set above -1, then if an item has not been accessed
in this number of seconds, it will be spooled to disk if
the disk is available. You can register an event handler on this
event.
|
N |
-1 |
ShrinkerIntervalSeconds |
This specifies how often the shrinker should run, if it has
been activated. If you set UseMemoryShrinker to false, then this
setting has no effect.
|
N |
60 |