Pavalisoft.Caching
1.2.1
A single unified Caching Api for both MemoryCache and DistributedCache implementations including CacheManager
|
Represents ICacheManager implementation More...
Public Member Functions | |
TItem | Get< TItem > (string partitionName, string key) |
Gets cache item having specified cache key form the specified cache partitionName More... | |
Task< TItem > | GetAsync< TItem > (string partitionName, string key, CancellationToken token=default) |
Gets cache item having specified cache key form the specified cache partitionName More... | |
void | Set< TItem > (string partitionName, string key, TItem value, IChangeToken expirationToken=null, PostEvictionCallbackRegistration postEvictionCallback=null) |
Adds an object to distributed cache More... | |
Task | SetAsync< TItem > (string partitionName, string key, TItem value, IChangeToken expirationToken=null, PostEvictionCallbackRegistration postEvictionCallback=null, CancellationToken token=default) |
Adds an object to distributed cache asynchronously More... | |
Task | SetAsync< TItem > (string partitionName, string key, TItem value, IChangeToken expirationToken, CancellationToken token=default) |
Adds an object to distributed cache asynchronously without post eviction callback More... | |
Task | SetAsync< TItem > (string partitionName, string key, TItem value, PostEvictionCallbackRegistration postEvictionCallback, CancellationToken token=default) |
Adds an object to distributed cache asynchronously without expiration change token More... | |
void | Refresh (string partitionName, string key) |
Refreshes the cache item of the specified cache key More... | |
Task | RefreshAsync (string partitionName, string key, CancellationToken token=default) |
Refreshes the cache item asynchronously for the specified cache key More... | |
void | Remove (string partitionName, string key) |
Removes the Cache object from the cache for the specified cache key More... | |
Task | RemoveAsync (string partitionName, string key, CancellationToken token=default) |
Removes the Cache object asynchronously from the cache for the specified cache key More... | |
Represents ICacheManager implementation
TItem Pavalisoft.Caching.Interfaces.ICacheManager.Get< TItem > | ( | string | partitionName, |
string | key | ||
) |
Gets cache item having specified cache key form the specified cache partitionName
TItem | Cache object type |
Implemented in Pavalisoft.Caching.CacheManager.
Task<TItem> Pavalisoft.Caching.Interfaces.ICacheManager.GetAsync< TItem > | ( | string | partitionName, |
string | key, | ||
CancellationToken | token = default |
||
) |
Gets cache item having specified cache key form the specified cache partitionName
TItem | Cache object type |
partitionName | Cache Partition Name |
key | Cache key |
token | CancellationToken to be used while getting cache item |
Implemented in Pavalisoft.Caching.CacheManager.
void Pavalisoft.Caching.Interfaces.ICacheManager.Refresh | ( | string | partitionName, |
string | key | ||
) |
Refreshes the cache item of the specified cache key
Implemented in Pavalisoft.Caching.CacheManager.
Task Pavalisoft.Caching.Interfaces.ICacheManager.RefreshAsync | ( | string | partitionName, |
string | key, | ||
CancellationToken | token = default |
||
) |
Refreshes the cache item asynchronously for the specified cache key
partitionName | Cache Partition Name |
key | Cache Key |
token | CancellationToken to be used while refreshing cache item |
Implemented in Pavalisoft.Caching.CacheManager.
void Pavalisoft.Caching.Interfaces.ICacheManager.Remove | ( | string | partitionName, |
string | key | ||
) |
Removes the Cache object from the cache for the specified cache key
Implemented in Pavalisoft.Caching.CacheManager.
Task Pavalisoft.Caching.Interfaces.ICacheManager.RemoveAsync | ( | string | partitionName, |
string | key, | ||
CancellationToken | token = default |
||
) |
Removes the Cache object asynchronously from the cache for the specified cache key
partitionName | Cache Partition Name |
key | Cache key |
token | CancellationToken to be used while removing cache item |
Implemented in Pavalisoft.Caching.CacheManager.
void Pavalisoft.Caching.Interfaces.ICacheManager.Set< TItem > | ( | string | partitionName, |
string | key, | ||
TItem | value, | ||
IChangeToken | expirationToken = null , |
||
PostEvictionCallbackRegistration | postEvictionCallback = null |
||
) |
Adds an object to distributed cache
TItem | Cache object type |
partitionName | Cache Partition Name |
key | Cache Key |
value | Cache object |
expirationToken | Cache IChangeToken expiration token to be used while adding cache item |
postEvictionCallback | PostEvictionCallbackRegistration delegate |
Implemented in Pavalisoft.Caching.CacheManager.
Task Pavalisoft.Caching.Interfaces.ICacheManager.SetAsync< TItem > | ( | string | partitionName, |
string | key, | ||
TItem | value, | ||
IChangeToken | expirationToken = null , |
||
PostEvictionCallbackRegistration | postEvictionCallback = null , |
||
CancellationToken | token = default |
||
) |
Adds an object to distributed cache asynchronously
TItem | Cache object type |
partitionName | Cache Partition Name |
key | Cache Key |
value | Cache object |
expirationToken | Cache IChangeToken expiration token to be used while adding cache item |
postEvictionCallback | PostEvictionCallbackRegistration delegate |
token | CancellationToken to be used while setting cache item |
Implemented in Pavalisoft.Caching.CacheManager.
Task Pavalisoft.Caching.Interfaces.ICacheManager.SetAsync< TItem > | ( | string | partitionName, |
string | key, | ||
TItem | value, | ||
IChangeToken | expirationToken, | ||
CancellationToken | token = default |
||
) |
Adds an object to distributed cache asynchronously without post eviction callback
TItem | Cache object type |
partitionName | Cache Partition Name |
key | Cache Key |
value | Cache object |
expirationToken | Cache IChangeToken expiration token to be used while adding cache item |
token | CancellationToken to be used while setting cache item |
Implemented in Pavalisoft.Caching.CacheManager.
Task Pavalisoft.Caching.Interfaces.ICacheManager.SetAsync< TItem > | ( | string | partitionName, |
string | key, | ||
TItem | value, | ||
PostEvictionCallbackRegistration | postEvictionCallback, | ||
CancellationToken | token = default |
||
) |
Adds an object to distributed cache asynchronously without expiration change token
TItem | Cache object type |
partitionName | Cache Partition Name |
key | Cache Key |
value | Cache object |
postEvictionCallback | PostEvictionCallbackRegistration delegate |
token | CancellationToken to be used while setting cache item |
Implemented in Pavalisoft.Caching.CacheManager.