mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-22 03:50:55 +08:00
🎨 Brand new marketplace UI https://github.com/siyuan-note/siyuan/issues/8181
This commit is contained in:
parent
953e2fa90b
commit
a219cf52f5
@ -262,7 +262,7 @@ func ThemeJSON(themeDirName string) (ret *Theme, err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var cachedStageIndex map[string]*StageIndex
|
var cachedStageIndex = map[string]*StageIndex{}
|
||||||
var stageIndexCacheTime int64
|
var stageIndexCacheTime int64
|
||||||
var stageIndexLock = sync.Mutex{}
|
var stageIndexLock = sync.Mutex{}
|
||||||
|
|
||||||
@ -276,7 +276,7 @@ func getStageIndex(pkgType string) (ret *StageIndex, err error) {
|
|||||||
defer stageIndexLock.Unlock()
|
defer stageIndexLock.Unlock()
|
||||||
|
|
||||||
now := time.Now().Unix()
|
now := time.Now().Unix()
|
||||||
if 3600 >= now-stageIndexCacheTime {
|
if 3600 >= now-stageIndexCacheTime && nil != cachedStageIndex[pkgType] {
|
||||||
ret = cachedStageIndex[pkgType]
|
ret = cachedStageIndex[pkgType]
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user