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

CachingBackend.DisposeAsync Method

DisposeAsync()

Declaration
public ValueTask DisposeAsync()
Returns
Type Description
System.Threading.Tasks.ValueTask

DisposeAsync(CancellationToken)

Asynchronously dispose the current CachingBackend. This overload 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 ValueTask DisposeAsync(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.

Returns
Type Description
System.Threading.Tasks.ValueTask

A System.Threading.Tasks.Task.