Interface ICacheManager
- Namespace
- Dynamicweb.Caching
- Assembly
- Dynamicweb.Core.dll
ICacheManager interface. Defines the contract for a cache manager.
Properties
AllKeys
Gets all keys currently in the cache.
Property Value
- IEnumerable<string>
All keys.
IsValid
Returns true if the cache manager is valid.
Property Value
- bool
true
if cache manager is valid; otherwise,false
.
this[string]
Gets or sets the object with the specified key in the cache.
Parameters
key
stringThe key.
Property Value
- object
System.Object.
Methods
Contains(string)
Determines whether the cache contains an entry with the specified key.
Parameters
key
stringThe key.
Returns
- bool
true
if a cache entry for the specified key exists; otherwise,false
.
Get(string)
Gets the cache entry for the specified key.
Parameters
key
stringThe key.
Returns
- object
System.Object.
Get<T>(string)
Gets the cache entry for the specified key.
Parameters
key
stringThe key.
Returns
- T
T.
Type Parameters
T
The type of the cache entry object.
Remove(string)
Removes the cache entry for the specified key.
Parameters
key
stringThe key.
Set(string, object)
Adds or updates the cache entry for the specified key with the given cache item.
Parameters
Set(string, object, CacheItemPolicy?)
Sets the cache entry for the specified key with the given cache item.
Parameters
key
stringThe key.
cacheItem
objectThe cache item.
policy
CacheItem Policy The policy specifying cache behavior.
TryGet<T>(string, out T?)
Tries the get the cache entry for the specified key.
Parameters
key
stringThe key.
value
TThe value.
Returns
- bool
true
if the Get-operation succeeded,false
otherwise.
Type Parameters
T
The type of the cache entry object.