|
Pavalisoft.Caching
1.2.1
A single unified Caching Api for both MemoryCache and DistributedCache implementations including CacheManager
|
Represents a ICache in ICachePartition implementation More...
Public Member Functions | |
| TItem | Get< TItem > (string key) |
| Gets the Cache object for the specified cache key More... | |
| Task< TItem > | GetAsync< TItem > (string key, CancellationToken token=default) |
| Gets the Cache object asynchronously for the specified cache key More... | |
| void | Set< TItem > (string key, TItem value, ExtendedDistributedCacheEntryOptions options) |
| Adds an object to distributed cache More... | |
| Task | SetAsync< TItem > (string key, TItem value, ExtendedDistributedCacheEntryOptions options, CancellationToken token=default) |
| Adds an object to distributed cache asynchronously More... | |
| void | Refresh (string key) |
| Refreshes the cache item of the specified cache key More... | |
| Task | RefreshAsync (string key, CancellationToken token=default) |
| Refreshes the cache item asynchronously for the specified cache key More... | |
| void | Remove (string key) |
| Removes the Cache object from the cache for the specified cache key More... | |
| Task | RemoveAsync (string key, CancellationToken token=default) |
| Removes the Cache object asynchronously from the cache for the specified cache key More... | |
| ICacheStore< T > | GetCacheStore< T > () |
| Gets the ICacheStore<T> for the type T from cache manager More... | |
| void | SetCacheStore< T > (ICacheStore< T > cacheStore) |
| Sets the ICacheStore<T> of the type T to the cache manager More... | |
Represents a ICache in ICachePartition implementation
| TItem Pavalisoft.Caching.Interfaces.ICache.Get< TItem > | ( | string | key | ) |
Gets the Cache object for the specified cache key
| TItem | Cache object type |
| key | Cache key |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.
| Task<TItem> Pavalisoft.Caching.Interfaces.ICache.GetAsync< TItem > | ( | string | key, |
| CancellationToken | token = default |
||
| ) |
Gets the Cache object asynchronously for the specified cache key
| TItem | Cache object type |
| key | Cache key |
| token | CancellationToken to be used while getting cache item |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.
| ICacheStore<T> Pavalisoft.Caching.Interfaces.ICache.GetCacheStore< T > | ( | ) |
Gets the ICacheStore<T> for the type T from cache manager
| T | Cache Store Type |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.
| void Pavalisoft.Caching.Interfaces.ICache.Refresh | ( | string | key | ) |
Refreshes the cache item of the specified cache key
| key | Cache key |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.
| Task Pavalisoft.Caching.Interfaces.ICache.RefreshAsync | ( | string | key, |
| CancellationToken | token = default |
||
| ) |
Refreshes the cache item asynchronously for the specified cache key
| key | Cache Key |
| token | CancellationToken to be used while refreshing cache item |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.
| void Pavalisoft.Caching.Interfaces.ICache.Remove | ( | string | key | ) |
Removes the Cache object from the cache for the specified cache key
| key | Cache key |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.
| Task Pavalisoft.Caching.Interfaces.ICache.RemoveAsync | ( | string | key, |
| CancellationToken | token = default |
||
| ) |
Removes the Cache object asynchronously from the cache for the specified cache key
| key | Cache key |
| token | CancellationToken to be used while removing cache item |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.
| void Pavalisoft.Caching.Interfaces.ICache.Set< TItem > | ( | string | key, |
| TItem | value, | ||
| ExtendedDistributedCacheEntryOptions | options | ||
| ) |
Adds an object to distributed cache
| TItem | Cache object type |
| key | Cache Key |
| value | Cache object |
| options | Distributed cache options. ExtendedDistributedCacheEntryOptions |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.
| Task Pavalisoft.Caching.Interfaces.ICache.SetAsync< TItem > | ( | string | key, |
| TItem | value, | ||
| ExtendedDistributedCacheEntryOptions | options, | ||
| CancellationToken | token = default |
||
| ) |
Adds an object to distributed cache asynchronously
| TItem | Cache object type |
| key | Cache Key |
| value | Cache object |
| options | Distributed cache options. ExtendedDistributedCacheEntryOptions |
| token | CancellationToken to be used while setting cache item |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.
| void Pavalisoft.Caching.Interfaces.ICache.SetCacheStore< T > | ( | ICacheStore< T > | cacheStore | ) |
Sets the ICacheStore<T> of the type T to the cache manager
| T | Cache Store type |
| cacheStore | Cache Store |
Implemented in Pavalisoft.Caching.Cache.DistributedCache.