MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Caching.​BackendsCaching­BackendDispose
Open sandboxFocus

CachingBackend.Dispose Method

Dispose()

Synchronously disposes the current CachingBackend. In case the CachingBackend has pending background tasks (typically cache non-blocking cache update tasks for distributed backends), it will wait until all tasks are processed.

Declaration
public void Dispose()

Dispose(CancellationToken)

Synchronously disposes the current CachingBackend. This overloads accepts a System.Threading.CancellationToken. In case the CachingBackend has pending background tasks (typically cache non-blocking cache update tasks for distributed backends), it will wait until all tasks are processed.

Declaration
public void Dispose(CancellationToken cancellationToken)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

A System.Threading.CancellationToken. Cancelling this operation may cause cache inconsistencies, in case of distributed cache, or failure to properly dispose of other resources owned by this object.

Dispose(Boolean, CancellationToken)

Synchronously disposes the current CachingBackend, with a parameter instructing whether this method is called because of a call to the Dispose() method or because of object finalizing.

Declaration
protected void Dispose(bool disposing, CancellationToken cancellationToken)
Parameters
Type Name Description
System.Boolean disposing

true if this method is called because the Dispose() method has been called, or false if the object is being finalized.

System.Threading.CancellationToken cancellationToken