Class VoidCacheHandler
The cache handler method mapping void implementation
public class VoidCacheHandler : ICacheHandler
- Inheritance
-
VoidCacheHandler
- Implements
- Inherited Members
Methods
ClearAsync(CancellationToken)
Map Apizr cache clearing method to your cache handler method
public Task ClearAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenAn optional cancellation token
Returns
GetAsync<T>(string, CancellationToken)
Map Apizr cache getting method to your cache handler method
public Task<T> GetAsync<T>(string key, CancellationToken cancellationToken = default)
Parameters
key
stringThe key to get from
cancellationToken
CancellationTokenAn optional cancellation token
Returns
- Task<T>
Type Parameters
T
The expected value type
RemoveAsync(string, CancellationToken)
Map Apizr cache removing method to your cache handler method
public Task<bool> RemoveAsync(string key, CancellationToken cancellationToken = default)
Parameters
key
stringThe key to remove from
cancellationToken
CancellationTokenAn optional cancellation token
Returns
SetAsync(string, object, TimeSpan?, CancellationToken)
Map Apizr cache saving method to your cache handler method
public Task SetAsync(string key, object obj, TimeSpan? timeSpan = null, CancellationToken cancellationToken = default)
Parameters
key
stringThe key to cache at
obj
objecttimeSpan
TimeSpan?cancellationToken
CancellationTokenAn optional cancellation token