Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Brand new marketplace UI https://github.com/siyuan-note/siyuan/issues/8181

Liang Dinga219cf52f58c
diff --git a/kernel/bazaar/package.go b/kernel/bazaar/package.go
index 45025f315b..3f988b514b 100644
--- a/kernel/bazaar/package.go
+++ b/kernel/bazaar/package.go
@@ -262,7 +262,7 @@ func ThemeJSON(themeDirName string) (ret *Theme, err error) {
return
}
-var cachedStageIndex map[string]*StageIndex
+var cachedStageIndex = map[string]*StageIndex{}
var stageIndexCacheTime int64
var stageIndexLock = sync.Mutex{}
@@ -276,7 +276,7 @@ func getStageIndex(pkgType string) (ret *StageIndex, err error) {
defer stageIndexLock.Unlock()
now := time.Now().Unix()
- if 3600 >= now-stageIndexCacheTime {
+ if 3600 >= now-stageIndexCacheTime && nil != cachedStageIndex[pkgType] {
ret = cachedStageIndex[pkgType]
return
}