use of lucee.commons.io.cache.CachePro in project Lucee by lucee.
the class TimespanCacheHandler method getCache.
private Cache getCache(PageContext pc) {
Cache cache = CacheUtil.getDefault(pc, cacheType, null);
if (cache == null) {
if (defaultCache == null) {
RamCache rm = new RamCache().init(0, 0, RamCache.DEFAULT_CONTROL_INTERVAL);
rm.decouple();
defaultCache = rm;
}
return defaultCache;
}
if (cache instanceof CachePro)
return ((CachePro) cache).decouple();
return cache;
}