Interface HasOptions<K, V, FC>

Options that may be passed to the LRUCache#has method.

interface HasOptions<K, V, FC> {
    status?: Status<V>;
    updateAgeOnHas?: boolean;
}

Type Parameters

  • K
  • V
  • FC

Hierarchy

Properties

status?: Status<V>
updateAgeOnHas?: boolean

When using time-expiring entries with ttl, setting this to true will make each item's age reset to 0 whenever its presence in the cache is checked with LRUCache#has, causing it to not expire. (It can still fall out of cache based on recency of use, of course.)

Has no effect if OptionsBase.ttl is not set.