LRUCache.getAndRefresh

Gets an item from the cache. A pointer to the item is returned, if found. If the item exists in the cache, its update time is updated.

Note that, if the item already existed and you change the value pointed to by the returned pointer, the create time will not be updated.

  1. T* getAndRefresh(hash_t key)
    class LRUCache(T, bool TrackCreateTimes = false)
    T*
    getAndRefresh
    (
    hash_t key
    )
  2. T* getAndRefresh(hash_t key, time_t access_time)

Parameters

key hash_t

key to lookup

Return Value

Type: T*

pointer to item value, may be null if key not found

Meta