perf: optimize authorization scoreline and workers

This commit is contained in:
2026-07-30 09:12:27 +08:00
parent 4bea745b79
commit bedc77bffd
52 changed files with 21911 additions and 347 deletions

View File

@@ -0,0 +1,14 @@
using Microsoft.AspNetCore.OutputCaching;
using Tiku.Application.Tenancy;
namespace Tiku.Api.Caching;
internal sealed class TenantPublicCacheInvalidator(IOutputCacheStore outputCacheStore)
: ITenantPublicCacheInvalidator
{
public ValueTask InvalidateCoreAsync(Guid tenantId, CancellationToken cancellationToken) =>
outputCacheStore.EvictByTagAsync($"tenant:{tenantId:N}", cancellationToken);
public async Task InvalidateAsync(Guid tenantId, CancellationToken cancellationToken = default) =>
await InvalidateCoreAsync(tenantId, cancellationToken);
}