Cache flush after database reset (#14873)

When starting the app on a fresh database reset the cache would be
filled with empty flat field metadata maps
Because the reset command hack through the repository directly in order
to create views and stuff
implemented an iso flush as the one existing initially
added it to a workspace deletion tambien
```
{
   byId: {],
   universalIdById: {}
}
```
This commit is contained in:
Paul Rastoin
2025-10-03 17:51:24 +02:00
committed by GitHub
parent 81e9a02101
commit d3a7241b6f
23 changed files with 210 additions and 162 deletions
@@ -36,7 +36,7 @@ export class ServerlessFunctionV2Service {
await this.flatEntityMapsCacheService.getOrRecomputeManyOrAllFlatEntityMaps(
{
workspaceId,
flatEntities: ['flatServerlessFunctionMaps'],
flatMapsKeys: ['flatServerlessFunctionMaps'],
},
);
@@ -84,7 +84,7 @@ export class ServerlessFunctionV2Service {
await this.flatEntityMapsCacheService.getOrRecomputeManyOrAllFlatEntityMaps(
{
workspaceId,
flatEntities: ['flatServerlessFunctionMaps'],
flatMapsKeys: ['flatServerlessFunctionMaps'],
},
);
@@ -102,7 +102,7 @@ export class ServerlessFunctionV2Service {
await this.flatEntityMapsCacheService.getOrRecomputeManyOrAllFlatEntityMaps(
{
workspaceId,
flatEntities: ['flatServerlessFunctionMaps'],
flatMapsKeys: ['flatServerlessFunctionMaps'],
},
);
@@ -155,7 +155,7 @@ export class ServerlessFunctionV2Service {
await this.flatEntityMapsCacheService.getOrRecomputeManyOrAllFlatEntityMaps(
{
workspaceId,
flatEntities: ['flatServerlessFunctionMaps'],
flatMapsKeys: ['flatServerlessFunctionMaps'],
},
);
@@ -178,7 +178,7 @@ export class ServerlessFunctionV2Service {
await this.flatEntityMapsCacheService.getOrRecomputeManyOrAllFlatEntityMaps(
{
workspaceId,
flatEntities: ['flatServerlessFunctionMaps'],
flatMapsKeys: ['flatServerlessFunctionMaps'],
},
);
@@ -233,7 +233,7 @@ export class ServerlessFunctionV2Service {
await this.flatEntityMapsCacheService.getOrRecomputeManyOrAllFlatEntityMaps(
{
workspaceId,
flatEntities: ['flatServerlessFunctionMaps'],
flatMapsKeys: ['flatServerlessFunctionMaps'],
},
);
@@ -256,7 +256,7 @@ export class ServerlessFunctionV2Service {
await this.flatEntityMapsCacheService.getOrRecomputeManyOrAllFlatEntityMaps(
{
workspaceId,
flatEntities: ['flatServerlessFunctionMaps'],
flatMapsKeys: ['flatServerlessFunctionMaps'],
},
);