Sample code here
Properties props = new Properties();
//
// Default cache configs
//
props.put("jcs.default", "");
props.put("jcs.default.cacheattributes","org.apache.jcs.engine.CompositeCacheAttributes");
props.put("jcs.default.cacheattributes.MaxObjects","1000");
props.put("jcs.default.cacheattributes.MemoryCacheName", "org.apache.jcs.engine.memory.lru.LRUMemoryCache");
props.put("jcs.default.cacheattributes.UseMemoryShrinker", "true");
props.put("jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds", "3600");
props.put("jcs.default.cacheattributes.ShrinkerIntervalSeconds", "60");
props.put("jcs.default.cacheattributes.MaxSpoolPerRun", "500");
//
// Region cache
//
props.put("jcs.region.myregionCache", "");
props.put("jcs.region.myregionCache.cacheattributes", "org.apache.jcs.engine.CompositeCacheAttributes");
props.put("jcs.region.myregionCache.cacheattributes.MaxObjects", "1000");
props.put("jcs.region.myregionCache.cacheattributes.MemoryCacheName", "org.apache.jcs.engine.memory.lru.LRUMemoryCache");
props.put("jcs.region.myregionCache.cacheattributes.UseMemoryShrinker", "true");
props.put("jcs.region.myregionCache.cacheattributes.MaxMemoryIdleTimeSeconds", "3600");
props.put("jcs.region.myregionCache.cacheattributes.ShrinkerIntervalSeconds", "60");
props.put("jcs.region.myregionCache.cacheattributes.MaxSpoolPerRun", "500");
props.put("jcs.region.myregionCache.cacheattributes.DiskUsagePatternName", "UPDATE");
props.put("jcs.region.myregionCache.elementattributes", "org.apache.jcs.engine.ElementAttributes");
props.put("jcs.region.myregionCache.elementattributes.IsEternal", "false");
...
// Configure
CompositeCacheManager ccm = CompositeCacheManager.getUnconfiguredInstance();
ccm.configure(props);
// Access region
CompositeCache myregionCache = ccm.getCache("myregionCache");
...