From 311bf9ef2556bc4606e28f0dbcad36ca48fe7530 Mon Sep 17 00:00:00 2001 From: video-prize-ranch Date: Fri, 26 May 2023 15:46:32 -0400 Subject: [PATCH] Remove old image caching --- utils/config.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/utils/config.go b/utils/config.go index 98c14d1..2931a98 100644 --- a/utils/config.go +++ b/utils/config.go @@ -44,26 +44,11 @@ func LoadConfig() { imgurId = os.Getenv("RIMGU_IMGUR_CLIENT_ID") } - imageCache := os.Getenv("IMAGE_CACHE") == "true" - - cleanupInterval, err := time.ParseDuration(os.Getenv("IMAGE_CACHE_CLEANUP_INTERVAL")) - if err != nil && imageCache { - log.Fatal("invalid configuration: invalid duration for IMAGE_CACHE_CLEANUP_INTERVAL") - } - - cacheDir := os.Getenv("IMAGE_CACHE_DIR") - if cacheDir == "" && imageCache { - log.Fatal("invalid configuration: no IMAGE_CACHE_DIR") - } - Config = config{ Port: port, Addr: addr, ImgurId: imgurId, FiberPrefork: os.Getenv("FIBER_PREFORK") == "true", - ImageCache: imageCache, - CleanupInterval: cleanupInterval, - CacheDir: cacheDir, Privacy: map[string]interface{}{ "set": os.Getenv("PRIVACY_NOT_COLLECTED") != "", "policy": os.Getenv("PRIVACY_POLICY"),