Cache.getRaw

Gets an item from the cache. If the item was found in the cache, its access time is updated.

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

class Cache(size_t ValueSize = 0, bool TrackCreateTimes = false)
ValueRef
getRaw
(
hash_t key
)
out (val) { static if (!is_dynamic) { if (val !is null) { assert (val.length == ValueSize); } } }

Parameters

key hash_t

key to lookup

Return Value

Type: ValueRef

a reference to item value or null if no such item was found.

Out: For values of fixed size the slice length is ValueSize unless the returned reference is null.

Meta