Table of Contents

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 string

The cluster name.

clusterVersion string

The cluster version.

userId string

The user identifier.

tenants IEnumerable<AuthorizedTenant>

The tenant info.

Returns

Task

A Task that will complete when the operation has completed.

RemoveAsync(params string[])

Removes the user from the cache.

Task RemoveAsync(params string[] userIds)

Parameters

userIds string[]

The user identifiers to remove.

Returns

Task

A Task that will complete when the operation has completed.

RemoveTenantAsync(string)

Removes the tenant from the cache.

Task RemoveTenantAsync(string tenantId)

Parameters

tenantId string

The tenant identifier.

Returns

Task

A Task that will complete when the operation has completed.

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 string

The cluster name.

clusterVersion string

The cluster version.

userId string

The user identifier.

Returns

Task<(IEnumerable<AuthorizedTenant> Tenants, string Etag)>

The authorized tenant identifiers or null when user is not cached.