PriorityCache.updatePriority

Updates an existing item's priority.

class PriorityCache(T)
T*
updatePriority
(
hash_t key
,
lazy ulong new_priority
,
bool tracK_get_miss = true
)

Parameters

key hash_t

item's key

new_priority ulong

node's new priority

tracK_get_miss bool

flags whether not finding the item should count as a cache miss

Return Value

Type: T*

A pointer to the item that was updated or null if the key didn't exist.

Meta