This page last changed on May 05, 2008 by smaddox.
The page 5.2.6 Caching does not exist.
To enable server caching, please see Caching.
To enable application caching,
- Edit the crowd-ehcache.xml file, which is located in the WEB-INF/classes directory of your application's Crowd client. The two main properties are:
- diskStore: If you have enabled disk persistence (diskPersistent="true") this is the location on the file system where Ehcache will store its caching information. By default it uses java.io.tmpdir which is Java's default temporary file location.
- defaultCache: This property has many configurable options. Please read the documentation provided by Ehcache to fully understand the implications and possibilities with this property. Some basic features are described below.
Below is a small snippet of the crowd-ehcache.xml file.
<ehcache>
<diskStore path="java.io.tmpdir"/>
<defaultCache
maxElementsInMemory="50000"
eternal="false"
overflowToDisk="false"
timeToIdleSeconds="300"
timeToLiveSeconds="300"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"/>
</ehcache>
Some basic features of defaultCache:
- eternal: This indicates that all elements in the cache will live for ever and that any time-outs will be ignored. It is strongly recommended that you set this to false.
- timeToIdleSeconds: This sets the maximum amount of time between an element being accessed and its expiry. If you set this value to 0, the element will idle indefinitely.
- timeToLiveSeconds: This set the maximum time between creation time of an element and its expiry. If you set this value to 0 it will live indefinitely.
- maxElementsInMemory: Sets the maximum number of elements that can be stored in the cache's memory. If this limit is reached, the default caching strategy LRU (Least Recently Used) will be invoked and those elements will be removed.
An element is anything stored in Crowd's cache: a user, a group, a list of users, a list of groups, a list of user memberships, a list of group memberships.
Hint: If you want to store everything in memory, try this value to start with:
(Number of users x 2) + (number of groups x 2)
RELATED TOPICS
Unable to render {children} Page not found: 5. System Administration Crowd Documentation
|