if (cacheMap == null) {
// If we have a capacity, use LRU cache otherwise use unlimited Cache
if (capacity > 0) {
cacheMap = new LRUCache(capacity);
} else {
cacheMap = new UnlimitedCache();
}
}
cacheMap.setUnlimitedDiskCache(unlimitedDiskCache);
cacheMap.setOverflowPersistence(overflowPersistence);