Managers.ICacheManager Interface
Namespace: Nucleus.Abstractions.Managers
Assembly: Nucleus.Abstractions.dll
Data cache manager.
Example
public class MyClass
{
private ICacheManager CacheManager { get; }
public MyClass(ICacheManager cacheManager, Context context)
{
this.CacheManager = cacheManager;
}
}
Methods
Clear
(String) Method
Clear (System.String)
Clear the specified cache.
ClearAll
ClearAll ()
Clear all caches.
Collect
Collect ()
Remove expired items from all caches.
Get<TKey, TModel>
(String) Method
Get<TKey, TModel> (String caller)
Get the Cache collection for the specified type and entity, or create and add a new one if it does not exist.
Parameters
| Name |
Type |
|
caller
|
String
A name for the cache collection. This parameter uses the CallerMemberName attribute to get the name of the class which called the method, and the
value is used in logging messages.
|
Report
Report ()
Report the current state of all caches.