Skip to content
Snippets Groups Projects
Commit 5d673c14 authored by thorben.betten's avatar thorben.betten
Browse files

Fixed: Prefer a local cache for too frequently queried context data -...

Fixed: Prefer a local cache for too frequently queried context data - /appsuite/platform/core#215 (4)
parent 71aa75b3
No related branches found
Tags lint-0.1.5
No related merge requests found
......@@ -31,6 +31,7 @@ import com.openexchange.cache.v2.events.CacheEvent;
import com.openexchange.cache.v2.events.CacheEventInterest;
import com.openexchange.cache.v2.events.CacheEvents;
import com.openexchange.cache.v2.events.DefaultCacheEventInterest;
import com.openexchange.cache.v2.filter.CacheFilter;
/**
* {@link ContextCacheListener} - Listens to events from the {@link CoreModuleName#CONTEXT} cache to invalidate the config-cascade cache as needed.
......@@ -42,7 +43,12 @@ public class ContextCacheListener extends AbstractTrackingCacheEventListener {
private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(ContextCacheListener.class);
/** The interest for all events in the "context" core module cache */
private static final CacheEventInterest EVENT_INTEREST = DefaultCacheEventInterest.builder() .build();
private static final CacheEventInterest EVENT_INTEREST = DefaultCacheEventInterest.builder()
.withOnlyRemote(false)
.withFilter(CacheFilter.builder()
.withCoreModuleName(CoreModuleName.CONTEXT)
.build())
.build();
/**
* Initializes a new {@link ContextCacheListener}.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment