|
|
@ -43,8 +43,10 @@ export default class Plugin implements PluginType { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static async list(ncMeta = Noco.ncMeta) { |
|
|
|
static async list(ncMeta = Noco.ncMeta) { |
|
|
|
let pluginList = await NocoCache.getList(CacheScope.PLUGIN, []); |
|
|
|
const cachedList = await NocoCache.getList(CacheScope.PLUGIN, []); |
|
|
|
if (!pluginList.length) { |
|
|
|
let { list: pluginList } = cachedList; |
|
|
|
|
|
|
|
const { isEmptyList } = cachedList; |
|
|
|
|
|
|
|
if (!isEmptyList && !pluginList.length) { |
|
|
|
pluginList = await ncMeta.metaList2(null, null, MetaTable.PLUGIN); |
|
|
|
pluginList = await ncMeta.metaList2(null, null, MetaTable.PLUGIN); |
|
|
|
await NocoCache.setList(CacheScope.PLUGIN, [], pluginList); |
|
|
|
await NocoCache.setList(CacheScope.PLUGIN, [], pluginList); |
|
|
|
} |
|
|
|
} |
|
|
|