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

CachingBackend.DisposeAsync Method

DisposeAsync()

Declaration
public ValueTask DisposeAsync()
Returns
Type Description
ValueTask

DisposeAsync(CancellationToken)

Asynchronously dispose the current CachingBackend. This overload accepts a 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
CancellationToken cancellationToken

A 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
ValueTask

A Task.