Open sandboxFocus
  • TOC

Metalama Documentation

Getting started

Video tutorials

Conceptual documentation

Commented examples

API documentation

Aspect API

Extensions API

Patterns API

Metalama.​Patterns.​Caching

Metalama.​Patterns.​Caching.​Aspects

Metalama.​Patterns.​Caching.​Aspects.​Configuration

Metalama.​Patterns.​Caching.​Aspects.​Helpers

Metalama.​Patterns.​Caching.​Backends

Metalama.​Patterns.​Caching.​Backends.​Azure

Metalama.​Patterns.​Caching.​Backends.​Redis

Metalama.​Patterns.​Caching.​Building

Metalama.​Patterns.​Caching.​Dependencies

Metalama.​Patterns.​Caching.​Formatters

Metalama.​Patterns.​Caching.​Implementation

Metalama.​Patterns.​Caching.​Locking

Metalama.​Patterns.​Caching.​Serializers

Metalama.​Patterns.​Caching.​Value­Adapters

Metalama.​Patterns.​Contracts

Metalama.​Patterns.​Contracts.​Numeric

Metalama.​Patterns.​Immutability

Metalama.​Patterns.​Immutability.​Configuration

Metalama.​Patterns.​Memoization

Metalama.​Patterns.​Observability

Metalama.​Patterns.​Observability.​Configuration

Metalama.​Patterns.​Observability.​Implementation

Metalama.​Patterns.​Wpf

Metalama.​Patterns.​Wpf.​Configuration

Flashtrace API

Introspection API

Advanced API

Post­Sharp API migration

  • Article

Method Dispose

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()
Implements

Dispose(CancellationToken)

Synchronously disposes the current CachingBackend. This overloads 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 void Dispose(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.

Dispose(bool, 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
bool disposing

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

CancellationToken cancellationToken