|
|
@ -160,13 +160,15 @@ export default class Model implements TableType { |
|
|
|
}, |
|
|
|
}, |
|
|
|
ncMeta = Noco.ncMeta |
|
|
|
ncMeta = Noco.ncMeta |
|
|
|
): Promise<Model[]> { |
|
|
|
): Promise<Model[]> { |
|
|
|
let modelList = []; |
|
|
|
let cachedList; |
|
|
|
if (base_id) { |
|
|
|
if (base_id) { |
|
|
|
await NocoCache.getList(CacheScope.MODEL, [project_id, base_id]); |
|
|
|
cachedList = await NocoCache.getList(CacheScope.MODEL, [project_id, base_id]); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
await NocoCache.getList(CacheScope.MODEL, [project_id]); |
|
|
|
cachedList = await NocoCache.getList(CacheScope.MODEL, [project_id]); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!modelList.length) { |
|
|
|
let { list: modelList } = cachedList; |
|
|
|
|
|
|
|
const { isEmptyList } = cachedList; |
|
|
|
|
|
|
|
if (!isEmptyList && !modelList.length) { |
|
|
|
modelList = await ncMeta.metaList2( |
|
|
|
modelList = await ncMeta.metaList2( |
|
|
|
project_id, |
|
|
|
project_id, |
|
|
|
base_id, |
|
|
|
base_id, |
|
|
|