From 83de271ed1be350cbd451248354564a8e13d77f1 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Sat, 27 Jan 2024 15:06:22 +0530 Subject: [PATCH] fix: cache fix for rename operation Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- packages/nocodb/src/models/Column.ts | 4 ++-- packages/nocodb/src/models/Model.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nocodb/src/models/Column.ts b/packages/nocodb/src/models/Column.ts index fbce1f91a0..658594064f 100644 --- a/packages/nocodb/src/models/Column.ts +++ b/packages/nocodb/src/models/Column.ts @@ -203,7 +203,7 @@ export default class Column implements ColumnType { ncMeta, ); - await View.clearSingleQueryCache(column.fk_model_id, []); + await View.clearSingleQueryCache(column.fk_model_id); if (column.view_id) { const viewColId = await View.getViewColumnId( @@ -1214,7 +1214,7 @@ export default class Column implements ColumnType { const column = await Column.get({ colId }, ncMeta); - await View.clearSingleQueryCache(column.fk_model_id, []); + await View.clearSingleQueryCache(column.fk_model_id); } public getValidators(): any { diff --git a/packages/nocodb/src/models/Model.ts b/packages/nocodb/src/models/Model.ts index f21100562c..c3c886613d 100644 --- a/packages/nocodb/src/models/Model.ts +++ b/packages/nocodb/src/models/Model.ts @@ -675,7 +675,7 @@ export default class Model implements TableType { ); // clear all the cached query under this model - await View.clearSingleQueryCache(tableId, []); + await View.clearSingleQueryCache(tableId); // clear all the cached query under related models for (const col of await this.get(tableId).then((t) => t.getColumns())) { @@ -685,7 +685,7 @@ export default class Model implements TableType { if (colOptions.fk_related_model_id === tableId) continue; - await View.clearSingleQueryCache(colOptions.fk_related_model_id, []); + await View.clearSingleQueryCache(colOptions.fk_related_model_id); } return res;