PostSharpAPI ReferencePost­Sharp.​Patterns.​Caching.​BackendsMemory­Caching­Backend
Open sandboxFocus

MemoryCachingBackend Class

A CachingBackend based on System.Runtime.Caching.MemoryCache (System.Runtime.Caching.MemoryCache). This cache is part of .NET Framework and is available for .NET Standard in the NuGet package System.Runtime.Caching.

Inheritance
MemoryCachingBackend
Implements
IDisposable
Namespace: PostSharp.Patterns.Caching.Backends
Assembly: PostSharp.Patterns.Caching.dll
Syntax
public sealed class MemoryCachingBackend : CachingBackend

Constructors

Name Description
MemoryCachingBackend()

Initializes a new MemoryCachingBackend based on the Default instance of the System.Runtime.Caching.MemoryCache class.

MemoryCachingBackend(MemoryCache)

Initializes a new MemoryCachingBackend based on the given System.Runtime.Caching.MemoryCache.

Methods

Name Description
ClearCore()

Clears the cache. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.

ContainsDependencyCore(String)

Determines whether the cache contains a given dependency. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

ContainsItemCore(String)

Determines whether the cache contains an item of a given key. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

GetItemCore(String, Boolean)

Gets a cache item given its key. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

InvalidateDependencyCore(String)

Removes from the cache all items that have a specific dependency. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

RemoveItemCore(String)

Removes a cache item from the cache given its key. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.

SetItemCore(String, CacheItem)

Sets a cache item. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked. Arguments are already validated by the consumer API.