return result;
}
@SuppressWarnings("unchecked")
void runCacheExpiry() {
CacheConfiguration cacheConfiguration = getConfiguration();
CacheConfiguration.Duration modifiedExpiry =
cacheConfiguration.getExpiry(CacheConfiguration.ExpiryType.MODIFIED);
long modifiedExpiryDuration =
modifiedExpiry == null ?
DEFAULT_CACHE_EXPIRY_MILLIS :
modifiedExpiry.getTimeUnit().toMillis(modifiedExpiry.getDurationAmount());
CacheConfiguration.Duration accessedExpiry =
cacheConfiguration.getExpiry(CacheConfiguration.ExpiryType.ACCESSED);
long accessedExpiryDuration =
accessedExpiry == null ?
DEFAULT_CACHE_EXPIRY_MILLIS :
accessedExpiry.getTimeUnit().toMillis(accessedExpiry.getDurationAmount());