|
|
@ -162,7 +162,10 @@ export default class Model implements TableType { |
|
|
|
): Promise<Model[]> { |
|
|
|
): Promise<Model[]> { |
|
|
|
let cachedList; |
|
|
|
let cachedList; |
|
|
|
if (base_id) { |
|
|
|
if (base_id) { |
|
|
|
cachedList = await NocoCache.getList(CacheScope.MODEL, [project_id, base_id]); |
|
|
|
cachedList = await NocoCache.getList(CacheScope.MODEL, [ |
|
|
|
|
|
|
|
project_id, |
|
|
|
|
|
|
|
base_id, |
|
|
|
|
|
|
|
]); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
cachedList = await NocoCache.getList(CacheScope.MODEL, [project_id]); |
|
|
|
cachedList = await NocoCache.getList(CacheScope.MODEL, [project_id]); |
|
|
|
} |
|
|
|
} |
|
|
@ -213,11 +216,13 @@ export default class Model implements TableType { |
|
|
|
}, |
|
|
|
}, |
|
|
|
ncMeta = Noco.ncMeta |
|
|
|
ncMeta = Noco.ncMeta |
|
|
|
): Promise<Model[]> { |
|
|
|
): Promise<Model[]> { |
|
|
|
let modelList = await NocoCache.getList(CacheScope.MODEL, [ |
|
|
|
const cachedList = await NocoCache.getList(CacheScope.MODEL, [ |
|
|
|
project_id, |
|
|
|
project_id, |
|
|
|
db_alias, |
|
|
|
db_alias, |
|
|
|
]); |
|
|
|
]); |
|
|
|
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, |
|
|
|
db_alias, |
|
|
|
db_alias, |
|
|
|