diff --git a/packages/nocodb/src/models/Column.ts b/packages/nocodb/src/models/Column.ts index 1695d1b4db..bbaebabe2c 100644 --- a/packages/nocodb/src/models/Column.ts +++ b/packages/nocodb/src/models/Column.ts @@ -1075,6 +1075,30 @@ export default class Column implements ColumnType { // set cache await NocoCache.set(key, o); } + + // get model column list from cache + const columnListFromCache = await NocoCache.getList(CacheScope.COLUMN, [ + oldCol.fk_model_id, + ]); + + // update column list in cache if cache exists + if (!columnListFromCache.list?.length) { + const updatedColumnList = columnListFromCache.list.map((column: any) => { + if (column.id === colId) { + return { + ...column, + ...updateObj, + }; + } + return column; + }); + await NocoCache.setList( + CacheScope.COLUMN, + [oldCol.fk_model_id], + updatedColumnList, + ); + } + // set meta await ncMeta.metaUpdate( null,