Open sandboxFocus

Class CachingService

Inheritance
CachingService
Namespace: Metalama.Patterns.Caching
Assembly: Metalama.Patterns.Caching.dll
Syntax
public sealed class CachingService : ICachingService, IAsyncDisposable, IDisposable

Properties

Name Description
AllBackends

Gets the set of distinct backends used in the service.

Default
DefaultBackend

Gets default CachingBackend, i.e. the physical storage of cache items.

KeyBuilder

Gets the CacheKeyBuilder used to generate caching keys, i.e. to serialize objects into a string.

Logger
Profiles

Gets the repository of caching profiles (CachingProfile).

Methods

Name Description
Create(Action<ICachingServiceBuilder>?, IServiceProvider?)
Dispose()
Dispose(CancellationToken)
DisposeAsync()
DisposeAsync(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