in src/main/java/com/googlesource/gerrit/plugins/multisite/forwarder/ForwardedCacheEvictionHandler.java [48:66]
public void evict(CacheEntry entry) throws CacheNotFoundException {
Cache<?, ?> cache = cacheMap.get(entry.getPluginName(), entry.getCacheName());
if (cache == null) {
throw new CacheNotFoundException(entry.getPluginName(), entry.getCacheName());
}
try {
Context.setForwardedEvent(true);
if (Constants.PROJECT_LIST.equals(entry.getCacheName())) {
// One key is holding the list of projects
cache.invalidateAll();
log.debug("Invalidated cache {}", entry.getCacheName());
} else {
cache.invalidate(entry.getKey());
log.debug("Invalidated cache {}[{}]", entry.getCacheName(), entry.getKey());
}
} finally {
Context.unsetForwardedEvent();
}
}