Class AuthorizationServiceClientCacheService
- Namespace
- FoundationaLLM.Common.Services.Cache
- Assembly
- FoundationaLLM.Common.dll
Provides the caching services used by the FoundationaLLM authorization service client.
public class AuthorizationServiceClientCacheService : IAuthorizationServiceClientCacheService
- Inheritance
-
AuthorizationServiceClientCacheService
- Implements
- Inherited Members
- Extension Methods
Constructors
AuthorizationServiceClientCacheService(AuthorizationServiceClientSettings, ILogger)
Provides the caching services used by the FoundationaLLM authorization service client.
public AuthorizationServiceClientCacheService(AuthorizationServiceClientSettings settings, ILogger logger)
Parameters
settingsAuthorizationServiceClientSettingsThe AuthorizationServiceClientSettings used to configure the authorization service client.
loggerILoggerThe ILogger used to log information.
Methods
SetValue(ActionAuthorizationRequest, ActionAuthorizationResult)
Sets an ActionAuthorizationResult in the cache.
public void SetValue(ActionAuthorizationRequest authorizationRequest, ActionAuthorizationResult result)
Parameters
authorizationRequestActionAuthorizationRequestThe ActionAuthorizationRequest key used to set the authorization result in the cache.
resultActionAuthorizationResult
TryGetValue(ActionAuthorizationRequest, out ActionAuthorizationResult?)
Attempts to retrieve an ActionAuthorizationResult from the cache.
public bool TryGetValue(ActionAuthorizationRequest authorizationRequest, out ActionAuthorizationResult? authorizationResult)
Parameters
authorizationRequestActionAuthorizationRequestThe ActionAuthorizationRequest key used to identify the authorization result in the cache.
authorizationResultActionAuthorizationResultThe ActionAuthorizationResult to be retrieved.