ICacheClient

Namespace: ASPSecurityKit
Assembly: ASPSecurityKit.dll

Summary

Provides an interface to perform simple caching operations.

Methods

Set<T>(key,value,expireAfter)

Summary

Sets the value in the cache storage for the specified key.

Parameters
Name Type Description
key System.String The key.
value T The value.
expireAfter System.Nullable{System.TimeSpan} The interval after which the cached data should expire (can be removed from the cache).
Generic Types
Name Description
T The type of the value.

Get<T>(key)

Summary

Gets the value from the cache storage by the specified key.

Returns

The value from the cache storage by the specified key.

Parameters
Name Type Description
key System.String The key.
Generic Types
Name Description
T The type of the value.

SetAsync<T>(key,value,expireAfter)

Summary

Sets the value in the cache storage for the specified key.

Parameters
Name Type Description
key System.String The key.
value T The value.
expireAfter System.Nullable{System.TimeSpan} The interval after which the cached data should expire (can be removed from the cache).
Generic Types
Name Description
T The type of the value.

SetAsync<T>(key,value,cancellationToken,expireAfter)

Summary

Sets the value in the cache storage for the specified key.

Parameters
Name Type Description
key System.String The key.
value T The value.
cancellationToken System.Threading.CancellationToken The cancellation token.
expireAfter System.Nullable{System.TimeSpan} The interval after which the cached data should expire (can be removed from the cache).
Generic Types
Name Description
T The type of the value.

GetAsync<T>(key)

Summary

Gets the value from the cache storage by the specified key.

Returns

The value from the cache storage by the specified key.

Parameters
Name Type Description
key System.String The key.
Generic Types
Name Description
T The type of the value.

GetAsync<T>(key,cancellationToken)

Summary

Gets the value from the cache storage by the specified key.

Returns

The value from the cache storage by the specified key.

Parameters
Name Type Description
key System.String The key.
cancellationToken System.Threading.CancellationToken The cancellation token.
Generic Types
Name Description
T The type of the value.