Interface IDataCacheRepository
Repository for reading and writing from the cache
Namespace: Simplic.Cache
Assembly: Simplic.Cache.dll
Syntax
public interface IDataCacheRepository
Methods
| Improve this Doc View SourceGet<T>(String, String, String)
Read data from the cache
Declaration
Task<T> Get<T>(string type, string keyName, string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | Data cache type |
System.String | keyName | Key name of the object |
System.String | key | Key value |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<T> | Cachned object if exists |
Type Parameters
Name | Description |
---|---|
T | Data type |
Remove(String, String, String)
Remove object from cache
Declaration
Task Remove(string type, string keyName, string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | Data cache type |
System.String | keyName | Key name of the object |
System.String | key | Key value |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Set<T>(String, String, String, T)
Write data to the cache
Declaration
Task Set<T>(string type, string keyName, string key, T obj)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | Data cache type |
System.String | keyName | Key name of the object |
System.String | key | Key value |
T | obj | Object to cache |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Type Parameters
Name | Description |
---|---|
T | Data type |