Class NullMemoryCache
A null implementation of Microsoft.Extensions.Caching.Memory.IMemoryCache that does nothing.
Namespace: Workspace.XBR.Xperiflow.Utilities.Cache
Assembly: Xperiflow.dll
Declaration
public class NullMemoryCache : IMemoryCache, IDisposable
Implements:
Microsoft.Extensions.Caching.Memory.IMemoryCache, System.IDisposable
Methods
CreateEntry(object)
Create or overwrite an entry in the cache.
Declaration
public ICacheEntry CreateEntry(object key)
Returns
Microsoft.Extensions.Caching.Memory.ICacheEntry
The newly created Microsoft.Extensions.Caching.Memory.ICacheEntry instance.
Parameters
| Type | Name | Description |
|---|---|---|
System.Object | key | An object identifying the entry. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Remove(object)
Removes the object associated with the given key.
Declaration
public void Remove(object key)
Parameters
| Type | Name | Description |
|---|---|---|
System.Object | key | An object identifying the entry. |
TryGetValue(object, out object)
Gets the item associated with this key if present.
Declaration
public bool TryGetValue(object key, out object value)
Returns
System.Boolean
True if the key was found.
Parameters
| Type | Name | Description |
|---|---|---|
System.Object | key | An object identifying the requested entry. |
System.Object | value | The located value or null. |
Implements
Microsoft.Extensions.Caching.Memory.IMemoryCacheSystem.IDisposable
Inherited Members
System.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseCloneSystem.Object.ReferenceEquals(System.Object,System.Object)System.Object.ToString