WithL1(OutOfProcessCachingBackendBuilder, LayeredCachingBackendConfiguration?)
Adds an in-memory, in-process L1 cache in front of an out-of-process cache.
Declaration
public static LayeredCachingBackendBuilder WithL1(this OutOfProcessCachingBackendBuilder builder, LayeredCachingBackendConfiguration? configuration = null)Parameters
| Type | Name | Description |
|---|---|---|
| OutOfProcessCachingBackendBuilder | builder | |
| LayeredCachingBackendConfiguration | configuration |
Returns
| Type | Description |
|---|---|
| LayeredCachingBackendBuilder |
Remarks
If the out-of-process backend reports Blocking as false, the L1 cache
decides between a local removal and a value read from the backend by comparing wall-clock timestamps taken on
different machines, which must therefore have synchronized clocks. The remarks of
Blocking describe the rule and what happens when the clocks differ.
WithL1(ConcreteCachingBackendBuilder, LayeredCachingBackendConfiguration?)
Adds an in-memory, in-process L1 cache in front of another in-memory back-end. This method is used for tests.
Declaration
[Obsolete("Adding a memory cache on the top of another memory cache should only be used in tests.")]
public static LayeredCachingBackendBuilder WithL1(this ConcreteCachingBackendBuilder builder, LayeredCachingBackendConfiguration? configuration = null)Parameters
| Type | Name | Description |
|---|---|---|
| ConcreteCachingBackendBuilder | builder | |
| LayeredCachingBackendConfiguration | configuration |
Returns
| Type | Description |
|---|---|
| LayeredCachingBackendBuilder |