MemoryCachingBackendConfiguration Class
Inheritance
MemoryCachingBackendConfiguration
Assembly: Metalama.Patterns.Caching.Backend.dll
public sealed class MemoryCachingBackendConfiguration : CachingBackendConfiguration
Constructors
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
Operators