Open sandboxFocus

Method WithMemoryCache

WithMemoryCache(IMemoryCache)

Specifies the IMemoryCache to use for the L1 layer. The caller owns it: the backend does not dispose it, and it clears only its own items.

Declaration
public LayeredCachingBackendBuilder WithMemoryCache(IMemoryCache memoryCache)
Parameters
Type Name Description
IMemoryCache memoryCache

The memory cache instance.

Returns
Type Description
LayeredCachingBackendBuilder

This builder for method chaining.