Open sandboxFocus

Class MemoryCachingBackendConfiguration

Inheritance
MemoryCachingBackendConfiguration
Namespace: Metalama.Patterns.Caching.Backends
Assembly: Metalama.Patterns.Caching.Backend.dll
Syntax
public sealed record MemoryCachingBackendConfiguration : CachingBackendConfiguration, IEquatable<CachingBackendConfiguration>, IEquatable<MemoryCachingBackendConfiguration>

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
Equals(CachingBackendConfiguration?)
Equals(MemoryCachingBackendConfiguration?)
Equals(object?)
GetHashCode()
PrintMembers(StringBuilder)
ToString()

Operators

Name Description
operator ==(MemoryCachingBackendConfiguration?, MemoryCachingBackendConfiguration?)
operator !=(MemoryCachingBackendConfiguration?, MemoryCachingBackendConfiguration?)