Class AppPolicedCacheDictionary<TKey>
Provides a base class for implementing a dictionary of IAppPolicyCache.
Inheritance
System.Object
Namespace: Umbraco.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public abstract class AppPolicedCacheDictionary<TKey> : IDisposable
Type Parameters
Name | Description |
---|---|
TKey | The type of the dictionary key. |
Constructors
View SourceAppPolicedCacheDictionary(Func<TKey, IAppPolicyCache>)
Initializes a new instance of the AppPolicedCacheDictionary<TKey> class.
Declaration
protected AppPolicedCacheDictionary(Func<TKey, IAppPolicyCache> cacheFactory)
Parameters
Type | Name | Description |
---|---|---|
System.Func<TKey, IAppPolicyCache> | cacheFactory |
Methods
View SourceClearAllCaches()
Clears all caches.
Declaration
public void ClearAllCaches()
ClearCache(TKey)
Clears a cache.
Declaration
public void ClearCache(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Get(TKey)
Tries to get a cache.
Declaration
public Attempt<IAppPolicyCache> Get(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key |
Returns
Type | Description |
---|---|
Attempt<IAppPolicyCache> |
GetOrCreate(TKey)
Gets or creates a cache.
Declaration
public IAppPolicyCache GetOrCreate(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key |
Returns
Type | Description |
---|---|
IAppPolicyCache |
Remove(TKey)
Removes a cache.
Declaration
public void Remove(TKey key)
Parameters
Type | Name | Description |
---|---|---|
TKey | key |
RemoveAll()
Removes all caches.
Declaration
public void RemoveAll()