mirror of
https://github.com/simon-ding/polaris.git
synced 2026-05-24 03:27:48 +08:00
feat: clean cache upon indexer setting changes
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user