ExpiringLRUCache.exists

Checks whether an item exists in the cache and updates its access time. If the life time of the item has expired, it is removed.

  1. bool exists(hash_t key, bool expired)
    class ExpiringLRUCache(T = void[])
    bool
    exists
    (
    hash_t key
    ,
    out bool expired
    )
    out (does_exist) { if (expired) assert (!does_exist); }
  2. bool exists(hash_t key)

Parameters

key hash_t

key to lookup

expired bool

true: an item was found but removed because it was expired

Return Value

Type: bool

true if item exists in cache and its life time is not yet expired.

Out: If expired is false, the return value is false.

Meta