Cache cover arts. closes #19

This commit is contained in:
Deluan 2020-04-05 20:31:05 -04:00 committed by Deluan Quintão
parent a1ba5c59b2
commit 05ffb1acad
6 changed files with 170 additions and 58 deletions

View file

@ -212,11 +212,11 @@ func NewTranscodingCache() (TranscodingCache, error) {
if err != nil {
cacheSize = consts.DefaultTranscodingCacheSize
}
lru := fscache.NewLRUHaunter(consts.DefaultTranscodingCacheMaxItems, int64(cacheSize), consts.DefaultTranscodingCachePurgeInterval)
lru := fscache.NewLRUHaunter(consts.DefaultTranscodingCacheMaxItems, int64(cacheSize), consts.DefaultTranscodingCacheCleanUpInterval)
h := fscache.NewLRUHaunterStrategy(lru)
cacheFolder := filepath.Join(conf.Server.DataFolder, consts.TranscodingCacheDir)
log.Info("Creating transcoding cache", "path", cacheFolder, "maxSize", humanize.Bytes(cacheSize),
"cleanUpInterval", consts.DefaultTranscodingCachePurgeInterval)
"cleanUpInterval", consts.DefaultTranscodingCacheCleanUpInterval)
fs, err := fscache.NewFs(cacheFolder, 0755)
if err != nil {
return nil, err