We use Guava LoadingCache, which is created using CacheLoader.
What we are looking for is a cache that will regularly update its content, but also end keys after a given (longer) timeframe if the key is no longer available.
Is it possible to use .refresAfterWrite(30, TimeUnit.SECONDS), as well as .expireAfterAccess(10,TimeUnit.MINUTES)on the same CacheLoader?
My experience is that keys are never forced out due to a regular reboot through refreshAfterWrite. The documentation leaves me with a bit of vagueness in this matter.
source
share