Class InMemoryClaimCheckRepository
In-memory implementation of .
Suitable for single-process scenarios, testing, and push/pop stash patterns.
Thread-safe via .
public sealed class InMemoryClaimCheckRepository : IClaimCheckRepository
Inheritance
Implements
Properties
Count
Number of entries currently in the store (including potentially expired).
public int Count { get; }
Methods
Remove(string, CancellationToken)
Explicitly removes data by claim key.
public Task Remove(string key, CancellationToken ct = default)
Retrieve(string, CancellationToken)
Retrieves data by claim key without removing it.
public Task<byte[]?> Retrieve(string key, CancellationToken ct = default)
RetrieveAndRemove(string, CancellationToken)
Retrieves and removes data by claim key atomically.
public Task<byte[]?> RetrieveAndRemove(string key, CancellationToken ct = default)
Store(ReadOnlyMemory<byte>, TimeSpan?, CancellationToken)
Stores data under an auto-generated unique key.
public Task<string> Store(ReadOnlyMemory<byte> data, TimeSpan? ttl = null, CancellationToken ct = default)
Store(string, ReadOnlyMemory<byte>, TimeSpan?, CancellationToken)
Stores data under a specific key. Overwrites if key already exists.
public Task Store(string key, ReadOnlyMemory<byte> data, TimeSpan? ttl = null, CancellationToken ct = default)
Constructors
InMemoryClaimCheckRepository(TimeSpan?)
Creates a new in-memory claim check repository.