Documentation for Crowd 1.0. Documentation for other versions of Crowd is available too.

In Crowd, caching occurs in two main areas:
  • The Crowd server itself — certain parts of the Crowd Administration Console application are stored in a local cache to improve performance.
  • The applications that are connected to Crowd — e.g. JIRA, Confluence and Bamboo. These applications store users, groups and role data in a local cache, which helps improve the performance of Crowd since these applications do not have to repeatedly request information from Crowd. Generally it is not necessary to configure application caching, although this depends on the size of your application deployments.

To enable server caching, please see 5.2.6 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 set this to false.
  • timeToIdleSeconds: This sets the maximum amount of time between an element being accessed and it 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 when it will expire. 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.

Related Topics  

Crowd 1.0 Documentation