/** * Evict an item from the cache due to expiration. The caller is responsible for determining whether the entry has * expired. This method will log the eviction (if logging is enabled) and remove the entry. */ private void evict(final K key, final TimestampedValue<V> entry, final int now) { Assert.pre(key != null); if (this.data.remove(key, entry)) { onEvict(key, entry.getValue()); logEviction(key, entry, now); } }