🎨 Improve rhy cache duration

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-04 11:50:40 +08:00
parent 79e7339517
commit 535308f6ab
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 16 additions and 9 deletions

View file

@ -575,7 +575,7 @@ func getStageIndex(pkgType string) (ret *StageIndex, err error) {
defer stageIndexLock.Unlock()
now := time.Now().Unix()
if 3600 >= now-stageIndexCacheTime && nil != cachedStageIndex[pkgType] {
if util.RhyCacheDuration >= now-stageIndexCacheTime && nil != cachedStageIndex[pkgType] {
ret = cachedStageIndex[pkgType]
return
}