mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Brand new marketplace UI https://github.com/siyuan-note/siyuan/issues/8181
This commit is contained in:
parent
953e2fa90b
commit
a219cf52f5
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue