public void invalidateAll() { if (isCacheEnabled()) { synchronized (this) { long count = sizeCounter.getCount(); sizeCounter.dec(count); invalidationsCounter.inc(count); // caches may be null if we're called for invalidation during a hot-reload Cache cache = getEntryCache(); if (cache != null) { cache.invalidateAll(); } cache = getEntryCacheWithoutReferences(); if (cache != null) { cache.invalidateAll(); } } } }
public void invalidate(List<String> entryIds) { if (isCacheEnabled()) { synchronized (this) { for (String entryId : entryIds) { sizeCounter.dec(); invalidationsCounter.inc(); // caches may be null if we're called for invalidation during a hot-reload Cache cache = getEntryCache(); if (cache != null) { cache.invalidate(entryId); } cache = getEntryCacheWithoutReferences(); if (cache != null) { cache.invalidate(entryId); } } } } }
public DocumentModel getEntry(String entryId, EntrySource source, boolean fetchReferences) { if (!isCacheEnabled()) { return source.getEntryFromSource(entryId, fetchReferences); } else if (isCacheEnabled() && (getEntryCache() == null || getEntryCacheWithoutReferences() == null)) { if (log.isDebugEnabled()) { if (getEntryCache() == null) { log.debug(String.format( "The cache '%s' is undefined for directory '%s', it will be created with the default cache configuration", Cache cache = fetchReferences ? getEntryCache() : getEntryCacheWithoutReferences(); Serializable entry = cache.get(entryId); if (CACHE_MISS.equals(entry)) {
DirectoryCache cache = directory.getCache(); log.error("Session: " + session + "Vocabulary " + directoryName + " entry: " + entryId + " == Entry KO: directoryCache" + directory.getCache() + " / entryCache: " + directory.getCache().getEntryCache() + " / entryCacheWithoutReferences: " + directory.getCache().getEntryCacheWithoutReferences()); Cache entryCache = cache.getEntryCache(); try { DocumentModel deprecatedEntry = BaseSession.createEntryModel(null, schema, entryId, null, true);