Interface ITokenResponseCacheManager
Interface for the cache manager for the access token service.
Namespace: Geko.HttpClientService.Infrastructure
Assembly: Geko.HttpClientService.dll
Syntax
public interface ITokenResponseCacheManager
Remarks
It caches a successful response for the 75% of the expiration time define in the IdentityModel.Client.TokenResponse.
Methods
| Improve this Doc View SourceAddOrGetExistingAsync(String, Func<Task<TokenResponse>>)
Adds a new IdentityModel.Client.TokenResponse in the cache by executing the call
parameter, or returns an existing cached response.
Declaration
Task<TokenResponse> AddOrGetExistingAsync(string key, Func<Task<TokenResponse>> call)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the cache entry. |
Func<Task<IdentityModel.Client.TokenResponse>> | call | The delegate the returns a IdentityModel.Client.TokenResponse. |
Returns
Type | Description |
---|---|
Task<IdentityModel.Client.TokenResponse> | A IdentityModel.Client.TokenResponse, either just aqcuired or from the cache |
Remove(String)
Removes an entry from the cache
Declaration
void Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the cache entry. |