Guava CacheBuilder: imply additional conditions to entity removal
问题 I want: Remove entity when both conditions are true timeout expired some external conditions are true Question: How should I imply additional removal conditions besides timeout? Or how can I restore entity from removal listener (see code below)? My code (which already remove based on timeout only): LoadingCache<String, Integer> ints = CacheBuilder.newBuilder() .maximumSize(10000) .expireAfterAccess(ACCESS_TIMEOUT, TimeUnit.MILLISECONDS) .removalListener( new RemovalListener() { public void