Table of Contents

Class KEFCoreValueBufferCacheAttribute

Namespace
MASES.EntityFrameworkCore.KNet.Metadata
Assembly
MASES.EntityFrameworkCore.KNet.dll

Configures an in-memory result cache for this entity type's Kafka Streams state store.

Two independent caches are maintained: one for forward enumeration (GetValueBuffers, GetValueBuffersRange, single key lookup) and one for reverse enumeration (GetValueBuffersReverse, GetValueBuffersReverseRange). Each is backed by its own SortedList<TKey, TValue> and populated independently on the first complete enumeration in the respective direction.

Partial enumerations (e.g. First(), Take(n)) never populate the cache. Both caches are invalidated automatically when new data arrives from the cluster via FreshEventChange.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class KEFCoreValueBufferCacheAttribute : Attribute
Inheritance
KEFCoreValueBufferCacheAttribute
Inherited Members

Constructors

KEFCoreValueBufferCacheAttribute(double, double)

Initializes a new instance of KEFCoreValueBufferCacheAttribute.

public KEFCoreValueBufferCacheAttribute(double ttlSeconds, double reverseTtlSeconds = -1)

Parameters

ttlSeconds double

Cache TTL in seconds for forward enumeration (GetValueBuffers, range, single key). Zero or negative disables the forward cache — the proxy acts as a transparent pass-through.

reverseTtlSeconds double

Cache TTL in seconds for reverse enumeration (GetValueBuffersReverse, reverse range). Zero or negative disables the reverse cache. Defaults to -1 which means: use the same value as ttlSeconds.

Properties

ReverseTtl

TTL for reverse cache. Zero disables it.

public TimeSpan ReverseTtl { get; }

Property Value

TimeSpan

Ttl

TTL for forward cache. Zero disables it.

public TimeSpan Ttl { get; }

Property Value

TimeSpan