feat: clean cache upon indexer setting changes

This commit is contained in:
Simon Ding
2024-10-10 09:21:33 +08:00
parent 19f21ddd6e
commit e0d0ab80b6
3 changed files with 17 additions and 5 deletions

View File

@@ -1,8 +1,14 @@
package torznab
import (
"polaris/log"
"polaris/pkg/cache"
"time"
)
var cc = cache.NewCache[string, *Response](time.Minute * 30)
var cc = cache.NewCache[string, []Result](time.Minute * 30)
func CleanCache() {
log.Debugf("clean all torznab caches")
cc = cache.NewCache[string, []Result](time.Minute * 30)
}