ICache.replaceRemovedItem

Called when a cache element is removed, replaces the cache items at index "replaced"" with the one at index "replace".

The "replace" and "replaced" indices are guaranteed to be different and valid cache item indices, i.e. less than this.length.

When this method has returned, the cache item at index "replace" won't be used until a new cache element is added; a subclass is free to do with it as it pleases but should be aware that it will be reused later on.

class ICache
protected
hash_t
replaceRemovedItem
(
size_t replaced
,
size_t replace
)

Parameters

replaced size_t

index of the cache item that is to be replaced

replace size_t

index of the cache item that will replace the replaced item

Return Value

Type: hash_t

the key of the cache item that was at index "replace"" before and is at index "replaced" now.

Meta