Interface ICache<T>
Implementation of an object cache.
Namespace: System.Memory
Assembly: Nuqleon.Memory.dll
Syntax
public interface ICache<T>
Type Parameters
Name | Description |
---|---|
T | Type of the objects kept in the cache. |
Methods
Create(T)
Caches the item and creates a reference to reconstruct the item with.
Declaration
IDiscardable<T> Create(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The instance to cache. |
Returns
Type | Description |
---|---|
IDiscardable<T> | A handle to reconstruct the original instance. |
Remarks
The lifetime of the item in the cache is tied to the lifetime of the reference.