MetalamaAPI documentationPatterns APIMetalama.​Patterns.​Caching.​BackendsMemory­Caching­Backend­Configuration
Open sandboxFocus

MemoryCachingBackendConfiguration Class

Inheritance
MemoryCachingBackendConfiguration
Namespace: Metalama.Patterns.Caching.Backends
Assembly: Metalama.Patterns.Caching.Backend.dll
Syntax
public sealed class MemoryCachingBackendConfiguration : CachingBackendConfiguration

Constructors

Name Description
MemoryCachingBackendConfiguration()

Properties

Name Description
EqualityContract
Serializer

Gets or sets an optional ICachingSerializer. By default, this property is null, and cached objects are referenced in the as is, without any serialization. Setting this property forces the cache to hold the serialized representation of the cached object.

SizeCalculator

Gets or sets a delegate that receives the object being cached and returns its size, for use in the Size property of the MemoryCacheEntryOptions object. This allows to enforce a size limit on the MemoryCache (see SizeLimit). The default value is a delegate returning the constant 1. This property is ignored if Serializer has a non-null value, because in this case the size is the number of bytes in the serialized item.

Methods

Name Description
<Clone>$()
Equals(CachingBackendConfiguration)
Equals(MemoryCachingBackendConfiguration)
Equals(Object)
GetHashCode()
PrintMembers(StringBuilder)
ToString()

Operators

Name Description
Equality(MemoryCachingBackendConfiguration, MemoryCachingBackendConfiguration)
Inequality(MemoryCachingBackendConfiguration, MemoryCachingBackendConfiguration)