@Test public void testNotStale() { strategy.onCacheRead(context); verify(context).checkIfAnyStale(); verify(context, never()).invalidate(anyString(), anyBoolean()); verify(context, never()).invalidateAll(anyBoolean()); verify(cache).checkIfAnyStale(); verify(cache, never()).invalidate(anyString(), any(Experiment.Builder.class)); verify(cache, never()).invalidateAll(any(Experiment.BuilderFactory.class)); }
@Override public void onCacheRead(String experimentName, CachingContext context) { invalidateAllIfStale(context); }
PeriodicStaleCheckingCacheStrategy extends BasicCacheStrategy { @Override public void onCacheRead(String experimentName, CachingContext context) { invalidateAllIfStale(context); } }
PeriodicStaleCheckingCacheStrategy extends BasicCacheStrategy { @Override public void onCacheRead(String experimentName, CachingContext context) { invalidateAllIfStale(context); } PeriodicStaleCheckingCacheStrategy(Duration period); }
PeriodicStaleCheckingCacheStrategy extends BasicCacheStrategy { @Override public void onCacheRead(String experimentName, CachingContext context) { invalidateAllIfStale(context); } PeriodicStaleCheckingCacheStrategy(Duration period); @Override void onCacheRead(String experimentName, CachingContext context); @Override void onCacheRead(CachingContext context); }
PeriodicStaleCheckingCacheStrategy extends BasicCacheStrategy { @Override public void onCacheRead(String experimentName, CachingContext context) { invalidateAllIfStale(context); } PeriodicStaleCheckingCacheStrategy(Duration period); @Override void onCacheRead(String experimentName, CachingContext context); @Override void onCacheRead(CachingContext context);  }