Config: ClusterCache

From Resin 4.0 Wiki

Revision as of 03:34, 18 October 2013 by Cowan (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search




A cache which stores consistent copies on the cluster segment.

Using the cache is like using java.util.Map. To add a new entry, call cache.put(key, value). To get the entry, call cache.get(key).

The cache configuration affects the lifetime, local caching timeouts and consistency.

ClusterCache is a javax.cache.Cache (JSR 107: JCache)

Example resin-web.xml

<web-app xmlns="" xmlns:resin="urn:java:com.caucho.resin" xmlns:ee="urn:java:ee">

  <resin:ClusterCache ee:Named="myCache">



ee:Named makes the cache available for injection by name

Example code using CDI Injection

import javax.inject.*;
import javax.cache.*;

public class MyService {
 private Cache<String,String> _cache;


<resin:ClusterCache> Attributes

Period Format

Personal tools