Class RuntimeCachingBuilderExtensions
Extensions for the configuration builder specific to System.Runtime.Caching cache handle.
Inherited Members
Namespace:CacheManager.Core
Assembly:CacheManager.SystemRuntimeCaching.dll
Syntax
public static class RuntimeCachingBuilderExtensions
Methods
| Improve this Doc View SourceWithSystemRuntimeCacheHandle(ConfigurationBuilderCachePart, Boolean)
Adds a MemoryCacheHandle<TCacheValue> using a MemoryCache. The name of the cache instance will be 'default'.
Declaration
public static ConfigurationBuilderCacheHandlePart WithSystemRuntimeCacheHandle(this ConfigurationBuilderCachePart part, bool isBackplaneSource = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ConfigurationBuilderCachePart | part | The builder part. |
| Boolean | isBackplaneSource | Set this to true if this cache handle should be the source of the backplane. This setting will be ignored if no backplane is configured. |
Returns
| Type | Description |
|---|---|
| ConfigurationBuilderCacheHandlePart | The builder part. |
WithSystemRuntimeCacheHandle(ConfigurationBuilderCachePart, String, Boolean)
Adds a MemoryCacheHandle<TCacheValue> using a MemoryCache instance with the given instanceName.
The named cache instance can be configured via app/web.config system.runtime.caching section.
Declaration
public static ConfigurationBuilderCacheHandlePart WithSystemRuntimeCacheHandle(this ConfigurationBuilderCachePart part, string instanceName, bool isBackplaneSource = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ConfigurationBuilderCachePart | part | The builder part. |
| String | instanceName | The name to be used for the cache instance. |
| Boolean | isBackplaneSource | Set this to true if this cache handle should be the source of the backplane. This setting will be ignored if no backplane is configured. |
Returns
| Type | Description |
|---|---|
| ConfigurationBuilderCacheHandlePart | The builder part. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | If part is null. |
| ArgumentNullException | Thrown if instanceName is null. |