Browse Source

fix: cache fix for rename operation

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/7512/head
Raju Udava 9 months ago
parent
commit
83de271ed1
  1. 4
      packages/nocodb/src/models/Column.ts
  2. 4
      packages/nocodb/src/models/Model.ts

4
packages/nocodb/src/models/Column.ts

@ -203,7 +203,7 @@ export default class Column<T = any> 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<T = any> 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 {

4
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;

Loading…
Cancel
Save