Interface IUserContextAuthorizationCacheManagement
Provides the functionalities of cache management of user context authorizations.
public interface IUserContextAuthorizationCacheManagement
Methods
AddOrReplaceAuthorizedValues<T>(string?, string, string, params T[])
Adds or replaces values in the cache for the specified tenant identifier, user identifier and key context.
void AddOrReplaceAuthorizedValues<T>(string? tenantId, string userId, string key, params T[] values)
Parameters
tenantIdstringThe tenant identifier.
userIdstringThe userId identifier.
keystringThe key.
valuesT[]Values to add or replace.
Type Parameters
TType of values.
GetValues<T>(string?, string, string)
Gets the values in the cache for the specified tenant identifier, user identifier and key context.
IEnumerable<T> GetValues<T>(string? tenantId, string userId, string key)
Parameters
Returns
- IEnumerable<T>
The values.
Type Parameters
TType of the values.
RemoveAuthorizedValue<T>(string, string, string, T)
Removes a value in the cache for the specified tenant identifier, user identifier and key context.
bool RemoveAuthorizedValue<T>(string tenantId, string userId, string key, T value) where T : notnull
Parameters
tenantIdstringThe tenant identifier.
userIdstringThe userId identifier.
keystringThe key.
valueTThe value to remove.
Returns
- bool
A value indicating wether the value has been removed.
Type Parameters
TType of the value.
RemoveAuthorizedValue<T>(string, string, T)
Removes a value in the cache for user identifier and key context.
void RemoveAuthorizedValue<T>(string userId, string key, T value) where T : notnull
Parameters
Type Parameters
TType of the value.
ResetAuthorizedValues(string, string)
Resets the cache for the specified user identifier and key context.
void ResetAuthorizedValues(string userId, string key)
Parameters
ResetAuthorizedValues(string, string, string)
Resets the cache for the specified tenant identifier, user identifier and key context.
bool ResetAuthorizedValues(string tenantId, string userId, string key)
Parameters
Returns
- bool
A value indicating wether the value has been reset.