Class PeriodicStaleCheckingCacheStrategy

java.lang.Object
io.rtr.alchemy.caching.BasicCacheStrategy
io.rtr.alchemy.caching.PeriodicStaleCheckingCacheStrategy
All Implemented Interfaces:
CacheStrategy

public class PeriodicStaleCheckingCacheStrategy extends BasicCacheStrategy
This caching strategy will periodically check whether the data in the cache is stale, and if so, refresh it. The periodic checking of staleness is driven by cache reads, so, any time the cache is read, if it's been a while since the last refresh and the data is stale, the cache will be refreshed.