|
Pavalisoft.Caching
1.2.1
A single unified Caching Api for both MemoryCache and DistributedCache implementations including CacheManager
|
Provides distribution cache implementation ofICache in ICachePartition More...
Public Member Functions | |
| DistributedCache (IExtendedDistributedCache distributedCache, ICacheStore cacheStore) | |
| Creates an instance of DistributedCache with IExtendedDistributedCache More... | |
| TItem | Get< TItem > (string key) |
| Gets the Cache object for the specified cache key More... | |
| async 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... | |
| async 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... | |
| async 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... | |
| async 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... | |
Provides distribution cache implementation ofICache in ICachePartition
| Pavalisoft.Caching.Cache.DistributedCache.DistributedCache | ( | IExtendedDistributedCache | distributedCache, |
| ICacheStore | cacheStore | ||
| ) |
Creates an instance of DistributedCache with IExtendedDistributedCache
| distributedCache | IExtendedDistributedCache |
| cacheStore | ICacheStore |
| TItem Pavalisoft.Caching.Cache.DistributedCache.Get< TItem > | ( | string | key | ) |
Gets the Cache object for the specified cache key
| TItem | Cache object type |
| key | Cache key |
Implements Pavalisoft.Caching.Interfaces.ICache.
| async Task<TItem> Pavalisoft.Caching.Cache.DistributedCache.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 |
Implements Pavalisoft.Caching.Interfaces.ICache.
| ICacheStore<T> Pavalisoft.Caching.Cache.DistributedCache.GetCacheStore< T > | ( | ) |
Gets the ICacheStore<T> for the type T from cache manager
| T | Cache Store Type |
Implements Pavalisoft.Caching.Interfaces.ICache.
| void Pavalisoft.Caching.Cache.DistributedCache.Refresh | ( | string | key | ) |
Refreshes the cache item of the specified cache key
| key | Cache key |
Implements Pavalisoft.Caching.Interfaces.ICache.
| async Task Pavalisoft.Caching.Cache.DistributedCache.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 |
Implements Pavalisoft.Caching.Interfaces.ICache.
| void Pavalisoft.Caching.Cache.DistributedCache.Remove | ( | string | key | ) |
Removes the Cache object from the cache for the specified cache key
| key | Cache key |
Implements Pavalisoft.Caching.Interfaces.ICache.
| async Task Pavalisoft.Caching.Cache.DistributedCache.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 |
Implements Pavalisoft.Caching.Interfaces.ICache.
| void Pavalisoft.Caching.Cache.DistributedCache.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 |
Implements Pavalisoft.Caching.Interfaces.ICache.
| async Task Pavalisoft.Caching.Cache.DistributedCache.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 |
Implements Pavalisoft.Caching.Interfaces.ICache.
| void Pavalisoft.Caching.Cache.DistributedCache.SetCacheStore< T > | ( | ICacheStore< T > | cacheStore | ) |
Sets the ICacheStore<T> of the type T to the cache manager
| T | Cache Store type |
| cacheStore | Cache Store |
Implements Pavalisoft.Caching.Interfaces.ICache.