Add option to disable Cache Warmer. Related to #2142

This commit is contained in:
Deluan
2023-02-06 09:50:04 -05:00
parent dad4949a6d
commit ee8f6447eb
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ type CacheWarmer interface {
func NewCacheWarmer(artwork Artwork, cache cache.FileCache) CacheWarmer {
// If image cache is disabled, return a NOOP implementation
if conf.Server.ImageCacheSize == "0" {
if conf.Server.ImageCacheSize == "0" || !conf.Server.EnableArtworkPrecache {
return &noopCacheWarmer{}
}