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

Interface ICachingService

Front-end interface used by the caching aspects.

Namespace: Metalama.Patterns.Caching
Assembly: Metalama.Patterns.Caching.dll
Syntax
public interface ICachingService : IAsyncDisposable, IDisposable

Properties

Name Description
AllBackends
KeyBuilder
Logger

Methods

Name Description
GetFromCacheOrExecuteTaskAsync<TTaskResultType>(CachedMethodMetadata, object?, object?[], Func<object?, object?[], CancellationToken, Task<object?>>, CacheItemConfiguration?, CancellationToken)
GetFromCacheOrExecuteValueTaskAsync<TTaskResultType>(CachedMethodMetadata, object?, object?[], Func<object?, object?[], CancellationToken, ValueTask<object?>>, CacheItemConfiguration?, CancellationToken)
GetFromCacheOrExecute<TResult>(CachedMethodMetadata, object?, object?[], Func<object?, object?[], object?>, CacheItemConfiguration?, CancellationToken)
InitializeAsync(CancellationToken)

Initializes the caching service. It is recommended to call this method from the start-up program sequence when the back-end involves a network or out-of-process service (e.g. Redis, Azure). If this method is not called, initialization will occur automatically upon the first call any cached method.

Extension Methods

  • Navigation