Marie
2025-04-18 14:02:36 +02:00
committed by GitHub
parent 8112c3aab3
commit fd750c7c0e
2 changed files with 12 additions and 2 deletions

View File

@ -55,7 +55,10 @@ export class WorkspaceMetadataCacheService {
}
if (currentCacheVersion !== undefined) {
this.workspaceCacheStorageService.flush(workspaceId, currentCacheVersion);
this.workspaceCacheStorageService.flushVersionedMetadata(
workspaceId,
currentCacheVersion,
);
}
await this.workspaceCacheStorageService.addObjectMetadataCollectionOngoingCachingLock(

View File

@ -253,7 +253,10 @@ export class WorkspaceCacheStorageService {
);
}
async flush(workspaceId: string, metadataVersion: number): Promise<void> {
async flushVersionedMetadata(
workspaceId: string,
metadataVersion: number,
): Promise<void> {
await this.cacheStorageService.del(
`${WorkspaceCacheKeys.MetadataObjectMetadataMaps}:${workspaceId}:${metadataVersion}`,
);
@ -272,6 +275,10 @@ export class WorkspaceCacheStorageService {
await this.cacheStorageService.del(
`${WorkspaceCacheKeys.MetadataObjectMetadataOngoingCachingLock}:${workspaceId}:${metadataVersion}`,
);
}
async flush(workspaceId: string, metadataVersion: number): Promise<void> {
await this.flushVersionedMetadata(workspaceId, metadataVersion);
await this.cacheStorageService.del(
`${WorkspaceCacheKeys.MetadataPermissionsRolesPermissions}:${workspaceId}`,