ExpiringLRUCache.getAndRefresh

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. T* getAndRefresh(hash_t key)
    class ExpiringLRUCache(T = void[])
    override
    T*
    getAndRefresh
    (
    hash_t key
    )
  2. alias getAndRefresh = LRUCache!(T, true).getAndRefresh
  3. T* getAndRefresh(hash_t key, bool expired)

Parameters

key hash_t

key to lookup

Return Value

Type: T*

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

Meta