Skip to main content

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
TypeNameDescription
System.ObjectkeyAn 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
TypeNameDescription
System.ObjectkeyAn 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
TypeNameDescription
System.ObjectkeyAn object identifying the requested entry.
System.ObjectvalueThe located value or null.

Implements

  • Microsoft.Extensions.Caching.Memory.IMemoryCache
  • System.IDisposable

Inherited Members

  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.ToString

Was this page helpful?