From 37bb1bba1404b4f0e7f4d94c97c45129c7cf88f1 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Tue, 23 May 2023 17:27:17 +0800 Subject: [PATCH] fix(nocodb): include base_id in cache key --- packages/nocodb/src/models/Model.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/models/Model.ts b/packages/nocodb/src/models/Model.ts index 04afc1991d..ad319ea55c 100644 --- a/packages/nocodb/src/models/Model.ts +++ b/packages/nocodb/src/models/Model.ts @@ -169,7 +169,10 @@ export default class Model implements TableType { }, ncMeta = Noco.ncMeta, ): Promise { - const cachedList = await NocoCache.getList(CacheScope.MODEL, [project_id]); + const cachedList = await NocoCache.getList(CacheScope.MODEL, [ + project_id, + base_id, + ]); let { list: modelList } = cachedList; const { isNoneList } = cachedList; if (!isNoneList && !modelList.length) { @@ -189,7 +192,11 @@ export default class Model implements TableType { model.meta = parseMetaProp(model); } - await NocoCache.setList(CacheScope.MODEL, [project_id], modelList); + await NocoCache.setList( + CacheScope.MODEL, + [project_id, base_id], + modelList, + ); } modelList.sort( (a, b) =>