PostSharp5.0/API Reference/Post­Sharp.​Patterns.​Caching.​Implementation Namespace/Caching­Backend Class

CachingBackend Class

An abstraction of the physical implementation of the cache, where the CacheAttribute ends up writing to and reading from.
Inheritance Hierarchy

Namespace:  PostSharp.Patterns.Caching.Implementation
Assembly:  PostSharp.Patterns.Caching (in PostSharp.Patterns.Caching.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
public abstract class CachingBackend : IDisposable

The CachingBackend type exposes the following members.

Constructors
  NameDescription
Protected methodCachingBackend
Initializes a new CachingBackend.
Properties
  NameDescription
Public propertyId
Gets the Guid of the current CachingBackend.
Protected propertyLogger
Gets the Logger that implementations can use to emit log records.
Public propertyStatus
Gets the status of the current CachingBackend (Default, Disposing or Disposed).
Public propertySupportedFeatures
Gets the set of features supported by the current CachingBackend.
Public propertyValueAdapters
Gets the factory of value adapters (IValueAdapter), which allow for instance to cache things like Stream or IEnumerable, which could not be otherwise cached.
Methods
  NameDescription
Public methodClear
Clears the cache.
Public methodClearAsync
Asynchronously clears the cache.
Protected methodClearAsyncCore
Asynchronously clears the cache. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.
Protected methodClearCore
Clears the cache. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.
Public methodContainsDependency
Determines whether the cache contains a given dependency.
Public methodContainsDependencyAsync
Asynchronously determines whether the cache contains a given dependency.
Protected methodContainsDependencyAsyncCore
Asynchronously 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.
Protected methodContainsDependencyCore
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.
Public methodContainsItem
Determines whether the cache contains an item of a given key.
Public methodContainsItemAsync
Asynchronously determines whether the cache contains an item of a given key.
Protected methodContainsItemAsyncCore
Asynchronously 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.
Protected methodContainsItemCore
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.
Protected methodCreateFeatures
Creates a CachingBackendFeatures object, which describes set of features implemented by the back-end. This method is invoked the first time the SupportedFeatures property is evaluated. The result is then cached.
Public methodDispose()
Synchronously dispose the current CachingBackend.
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the CachingBackend and optionally releases the managed resources
Public methodDisposeAsync
Asynchronously dispose the current CachingBackend.
Protected methodDisposeAsyncCore
Asynchronously disposes the current CachingBackend. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.
Protected methodDisposeCore
Synchronously disposes the current CachingBackend. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.
Protected methodEnqueueBackgroundTask Obsolete.
Public methodGetItem
Gets a cache item given its key.
Public methodGetItemAsync
Asynchronously gets a cache item given its key.
Protected methodGetItemAsyncCore
Asynchronously 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.
Protected methodGetItemCore
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.
Public methodInvalidateDependency
Removes from the cache all items that have a specific dependency.
Public methodInvalidateDependencyAsync
Asynchronously 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.
Protected methodInvalidateDependencyAsyncCore
Asynchronously 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.
Protected methodInvalidateDependencyCore
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.
Protected methodOnDependencyInvalidated(CacheDependencyInvalidatedEventArgs)
Protected methodOnDependencyInvalidated(String, Guid)
Raises the DependencyInvalidated event , but lazily instantiates the CacheDependencyInvalidatedEventArgs if there is an event client.
Protected methodOnItemRemoved(CacheItemRemovedEventArgs)
Raises the ItemRemoved event given a CacheItemRemovedEventArgs.
Protected methodOnItemRemoved(String, CacheItemRemovedReason, Guid)
Raises the ItemRemoved event, but lazily instantiates the CacheItemRemovedEventArgs if there is an event client.
Protected methodOnSynchronizationSignalReceived Obsolete.
Signals that a specific synchronization signal has been received. This completes the Task returned by the WhenSynchronizationSignalReceived(Guid, CancellationToken) method.
Public methodRemoveItem
Removes a cache item from the cache given its key.
Public methodRemoveItemAsync
Asynchronously removes a cache item from the cache given its key.
Protected methodRemoveItemAsyncCore
Asynchronously 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.
Protected methodRemoveItemCore
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.
Public methodSendSynchronizationSignalAsync Obsolete.
Sends a synchronization signal of a given Guid to the physical implementation of the cache.
Protected methodSendSynchronizationSignalAsyncCore Obsolete.
Sends a synchronization signal of a given Guid to the physical implementation of the cache. This protected method is part of the implementation API and is meant to be overridden in user code, not invoked.
Public methodSetItem
Sets a cache item.
Public methodSetItemAsync
Asynchronously sets a cache item.
Protected methodSetItemAsyncCore
Asynchronously 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. The default implementation is to call the synchronous SetItemCore(String, CacheItem) method.
Protected methodSetItemCore
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.
Protected methodStopAcceptingBackgroundTasks Obsolete.
Forbids the use of the EnqueueBackgroundTask(Func<Task>) method. This method is used for debugging purposes only.
Public methodToString
Returns a string that represents the current object.
(Overrides Object.ToString().)
Public methodWhenBackgroundTasksCompleted Obsolete.
Public methodWhenSynchronizationSignalReceived Obsolete.
Returns a Task that completes when a given synchronization signal is received from the physical implementation of the cache.
Events
  NameDescription
Public eventDependencyInvalidated
Events raised when a dependency is invalidated. Check the Events property to see if the current CachingBackend supports events.
Public eventItemRemoved
Event raised when a cache item is removed from the cache. Check the Events property to see if the current CachingBackend supports events.
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
See Also