|
|
@ -169,7 +169,10 @@ export default class Model implements TableType { |
|
|
|
}, |
|
|
|
}, |
|
|
|
ncMeta = Noco.ncMeta, |
|
|
|
ncMeta = Noco.ncMeta, |
|
|
|
): Promise<Model[]> { |
|
|
|
): Promise<Model[]> { |
|
|
|
const cachedList = await NocoCache.getList(CacheScope.MODEL, [project_id]); |
|
|
|
const cachedList = await NocoCache.getList(CacheScope.MODEL, [ |
|
|
|
|
|
|
|
project_id, |
|
|
|
|
|
|
|
base_id, |
|
|
|
|
|
|
|
]); |
|
|
|
let { list: modelList } = cachedList; |
|
|
|
let { list: modelList } = cachedList; |
|
|
|
const { isNoneList } = cachedList; |
|
|
|
const { isNoneList } = cachedList; |
|
|
|
if (!isNoneList && !modelList.length) { |
|
|
|
if (!isNoneList && !modelList.length) { |
|
|
@ -189,7 +192,11 @@ export default class Model implements TableType { |
|
|
|
model.meta = parseMetaProp(model); |
|
|
|
model.meta = parseMetaProp(model); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
await NocoCache.setList(CacheScope.MODEL, [project_id], modelList); |
|
|
|
await NocoCache.setList( |
|
|
|
|
|
|
|
CacheScope.MODEL, |
|
|
|
|
|
|
|
[project_id, base_id], |
|
|
|
|
|
|
|
modelList, |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
modelList.sort( |
|
|
|
modelList.sort( |
|
|
|
(a, b) => |
|
|
|
(a, b) => |
|
|
|