Allow cache image to be disabled (workaround for #177)

This commit is contained in:
Deluan
2020-04-14 19:15:47 -04:00
parent 66275d3b94
commit db4479e720
5 changed files with 116 additions and 76 deletions
+4
View File
@@ -12,6 +12,10 @@ import (
)
func newFileCache(name, cacheSize, cacheFolder string, maxItems int) (fscache.Cache, error) {
if cacheSize == "0" {
log.Warn(fmt.Sprintf("%s cache disabled", name))
return nil, nil
}
size, err := humanize.ParseBytes(cacheSize)
if err != nil {
size = consts.DefaultCacheSize