CacheFactory.getDefaultInstance().createCacheBuilder();
cacheBuilder.setMaxCount(maxEntries);
final SystemClock clock = SystemClock.getDefaultInstance();
cacheBuilder.setClock(clock);
cacheBuilder.setExpirationChecker(
new URLContentValidationChecker());
cache = cacheBuilder.buildCache();
} else {
cache = null;
}
cacheInitialized = true;