ExpiringCache.getRaw

Gets an item from the cache. If the item was found in the cache, its access time is updated. If the item life time has expired, it is automatically removed.

Note that, if you change the value referenced by the returned reference, the create time will not be updated.

  1. ValueRef getRaw(hash_t key)
  2. ValueRef getRaw(hash_t key, bool expired)
    class ExpiringCache(size_t ValueSize = 0)
    ValueRef
    getRaw
    (
    hash_t key
    ,
    out bool expired
    )
    out (val) { if (expired) assert (val is null); }

Parameters

key hash_t

key to lookup

expired bool

true: the item was found but expired so it was removed, false: the item was not found

Return Value

Type: ValueRef

a reference to the item value or null if no such item was found or it has expired so it was removed.

Out: - If expired, the returned reference is null. - See super class.

Meta