beforeGet method

  1. @override
CacheEntry<K, V>? beforeGet(
  1. CacheEntry<K, V> entry
)

Process the entry found in the storage before returning it. If this method returns null the entry is considered as expired and will not be returned to the caller.

Implementation

@override
CacheEntry<K, V>? beforeGet(CacheEntry<K, V> entry) {
  (entry as LfuCacheEntry).use++;
  return entry;
}