Module org.cruk.clarity.api
Package org.cruk.clarity.api.cache
package org.cruk.clarity.api.cache
Package supporting caching of Clarity entities in memory
(or, if so configured, on disk) to reduce the amount of traffic being
sent to and from the REST API.
At present, the "stateful" objects (specifically, the Artifact
class)
produces some problems. See the documentation for ClarityAPICache
for further information.
The cache is implemented using EhCache. To make use of it, you need to include
the file org/cruk/clarity/api/clarity-cache-context.xml
in your Spring application context path. Its individual caches are configured with
the file org/cruk/clarity/api/ehcache.xml
. The default version of
this file is packaged with the JAR, so if you need to change it create a replacement
that is before this project's JAR file on the class path.
If you do not use the cache, you can exclude it from this project's dependencies in Maven:
<dependency> <groupId>org.cruk.clarity</groupId> <artifactId>clarity-client</artifactId> <version>...</version> <exclusions> <exclusion> <groupId>org.ehcache</groupId> <artifactId>ehcache</artifactId> </exclusion> </exclusions> </dependency>
- See Also:
-
ClassDescriptionOptions for how the API cache handles entities that are stateful.A cache optionally deployed around a
ClarityAPI
bean as an aspect.Factory for creating a singleton EhCache 3CacheManager
from XML configuration.