Remove empty (invalid) entries from the cache

This commit is contained in:
Deluan
2022-12-24 18:53:09 -05:00
committed by Deluan Quintão
parent e89d99aee0
commit 52a4721c91
3 changed files with 203 additions and 1 deletions
+1 -1
View File
@@ -210,7 +210,7 @@ func newFSCache(name, cacheSize, cacheFolder string, maxItems int) (fscache.Cach
return nil, nil
}
lru := fscache.NewLRUHaunter(maxItems, int64(size), consts.DefaultCacheCleanUpInterval)
lru := NewFileHaunter(maxItems, int64(size), consts.DefaultCacheCleanUpInterval)
h := fscache.NewLRUHaunterStrategy(lru)
cacheFolder = filepath.Join(conf.Server.DataFolder, cacheFolder)