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
settings
AuthorizationServiceClientSettingsThe AuthorizationServiceClientSettings used to configure the authorization service client.
logger
ILoggerThe ILogger used to log information.
Methods
SetValue(ActionAuthorizationRequest, ActionAuthorizationResult)
Sets an ActionAuthorizationResult in the cache.
public void SetValue(ActionAuthorizationRequest authorizationRequest, ActionAuthorizationResult result)
Parameters
authorizationRequest
ActionAuthorizationRequestThe ActionAuthorizationRequest key used to set the authorization result in the cache.
result
ActionAuthorizationResult
TryGetValue(ActionAuthorizationRequest, out ActionAuthorizationResult?)
Attempts to retrieve an ActionAuthorizationResult from the cache.
public bool TryGetValue(ActionAuthorizationRequest authorizationRequest, out ActionAuthorizationResult? authorizationResult)
Parameters
authorizationRequest
ActionAuthorizationRequestThe ActionAuthorizationRequest key used to identify the authorization result in the cache.
authorizationResult
ActionAuthorizationResultThe ActionAuthorizationResult to be retrieved.