beforeGet method

  1. @protected
  2. @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

@protected
@override
CacheEntry<K, V>? beforeGet(CacheEntry<K, V> entry) {
  (entry as LruCacheEntry).updateLastUse(++lastUse);
  return entry;
}