LruCache

Description

sealed class Tinman.Core.Caching.LruCache<TId>

Derived from

ICache<TId>

A cache that uses a simple LRU (least-recently-used) replacement scheme.

Public / Constructors

Lru​Cache


public constructor LruCache → (5)

capacity in : int32

[>0]
The cache capacity.

callback opt : ICacheCallback<TId> = null

Optional cache callback. If null, using the PageLoadFlags.Partial will have no effect.

invalidId opt : TId = default(TId)

The page ID value that represents an invalid page ID. Unused cached slots will be set to this value.

equals opt : EqualsDelegate<TId> = null

The equality delegate.

hashCode opt : HashCodeDelegate<TId> = null

Optional hash code delegate.

Creates a new instance of LruCache.