/** * Build a cache for data requests and matching responses. * * @return The cache instance */ protected DataCache<?> buildCache() { if (CacheFeatureFlag.LOCAL_SIGNATURE.isOn()) { return buildLocalSignatureCache(); } else if (CacheFeatureFlag.TTL.isOn()) { return buildTtlCache(); } else if (CacheFeatureFlag.ETAG.isOn()) { return buildETagCahe(); } else { // not used, but Jersey required a binding return new StubDataCache<>(); } }
@Override protected DataCache<?> buildCache() { if (BardFeatureFlag.DRUID_CACHE.isOn()) { // test cache stored in memory if (BardFeatureFlag.DRUID_CACHE_V2.isOn()) { state.cache = new TestTupleDataCache(); } else { state.cache = new HashDataCache<>(new TestDataCache()); } } else { state.cache = new StubDataCache<>(); } return state.cache; }
@Override protected DataCache<?> buildCache() { if (BardFeatureFlag.DRUID_CACHE.isOn()) { // test cache stored in memory if (BardFeatureFlag.DRUID_CACHE_V2.isOn()) { state.cache = new TestTupleDataCache(); } else { state.cache = new HashDataCache<>(new TestDataCache()); } } else { state.cache = new StubDataCache<>(); } return state.cache; }