Interface ITenantUsersCache
- Namespace
- GroupeIsa.Neos.Shared.MultiTenant.Cache
- Assembly
- GroupeIsa.Neos.Shared.dll
Provides the functionalities of authorized tenants by user cache.
public interface ITenantUsersCache
Methods
AddOrUpdateAsync(string, string, string, IEnumerable<AuthorizedTenant>)
Adds or updates the cache for the specified user.
Task AddOrUpdateAsync(string clusterName, string clusterVersion, string userId, IEnumerable<AuthorizedTenant> tenants)
Parameters
clusterName
stringThe cluster name.
clusterVersion
stringThe cluster version.
userId
stringThe user identifier.
tenants
IEnumerable<AuthorizedTenant>The tenant info.
Returns
RemoveAsync(params string[])
Removes the user from the cache.
Task RemoveAsync(params string[] userIds)
Parameters
userIds
string[]The user identifiers to remove.
Returns
RemoveTenantAsync(string)
Removes the tenant from the cache.
Task RemoveTenantAsync(string tenantId)
Parameters
tenantId
stringThe tenant identifier.
Returns
TryGetAsync(string, string, string)
Tries to get the authorized tenants for the specified user.
Task<(IEnumerable<AuthorizedTenant>? Tenants, string Etag)> TryGetAsync(string clusterName, string clusterVersion, string userId)
Parameters
clusterName
stringThe cluster name.
clusterVersion
stringThe cluster version.
userId
stringThe user identifier.
Returns
- Task<(IEnumerable<AuthorizedTenant> Tenants, string Etag)>
The authorized tenant identifiers or
null
when user is not cached.