Browse Source

Merge pull request #7512 from nocodb/fix/rename-cache

fix: cache fix for rename operation
pull/7510/head
Raju Udava 10 months ago committed by GitHub
parent
commit
2f9d69496e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  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