Struct RandomAccessCache<TValue>.ReadSession
Represents a session that can be used to read the cache record value.
Implements
Inherited Members
Namespace: DotNext.Runtime.Caching
Assembly: DotNext.Threading.dll
Syntax
public readonly struct RandomAccessCache<TValue>.ReadSession : IDisposable
Remarks
While session alive, the record cannot be reclaimed.
Properties
View SourceKey
Gets the key associated with this cache entry.
Declaration
public ReadOnlySpan<byte> Key { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlySpan<byte> |
Value
Gets the value of the cache record.
Declaration
public TValue Value { get; }
Property Value
| Type | Description |
|---|---|
| TValue |
ValueRef
Gets a reference to the value of the cache record.
Declaration
public ref readonly TValue ValueRef { get; }
Property Value
| Type | Description |
|---|---|
| TValue |
Methods
View SourceDispose()
Closes the session.
Declaration
public void Dispose()
Remarks
This method should be called only once.