Table of Contents

Class SharedCache

Namespace
The.Caching.Storage
Assembly
Instagile.dll

Opaque LRU cache which can be shared between framework instances.

public sealed class SharedCache
Inheritance
SharedCache
Inherited Members

Remarks

Locking policy: the interface is internal, and consumers are responsible for using it correctly.

Eviction policy: When adding an entry would exceed MaxSize, evict least-recently-used entries until total size drops below CompactionThreshold.

Constructors

SharedCache(CachingOptions, ICacheStore?)

public SharedCache(CachingOptions options, ICacheStore? cacheStore = null)

Parameters

options CachingOptions
cacheStore ICacheStore

Properties

RowCount

public int RowCount { get; }

Property Value

int

Methods

Evict(HashSet<Guid>?)

Evicts entries until cache size drops below the specified target.

public void Evict(HashSet<Guid>? includeEntities = null)

Parameters

includeEntities HashSet<Guid>

Optional set of specific Row entry IDs to evict. If provided, these entries are removed before checking targetSize.