Interface ICacheContext
Gives access to the caches declared in the Caching configuration section.
public interface ICacheContext
Properties
Default
Gets the default cache, i.e. the cache named by the Default entry of the Caching configuration section.
ICache Default { get; }
Property Value
Exceptions
- InvalidOperationException
No cache is configured with the default name.
this[string]
Gets the cache with the given name, initializing it on first use when it is not flagged as auto start.
ICache this[string cacheName] { get; }
Parameters
cacheNamestringThe name of the cache, as defined in the configuration.
Property Value
- ICache
The cache.
Exceptions
- InvalidOperationException
No cache is configured with this name.
Methods
Exist(string)
Determines whether a cache with this name is declared in the configuration, whether it is already initialized or not.
bool Exist(string cacheName)
Parameters
cacheNamestringThe name of the cache.