diff --git a/app.py b/app.py index 88a7387..4312897 100644 --- a/app.py +++ b/app.py @@ -34,7 +34,12 @@ MAX_CONCURRENT_DOWNLOADS = 3 CACHE_EXPIRATION_SECONDS = 3600 # 1 hour CACHE_SIZE_LIMIT = 100 * 1024 * 1024 # 100 MB -cache = None if os.environ.get('NICONICOGAY_DISABLE_CACHE', '') != '' else Cache("disk_cache", size_limit=CACHE_SIZE_LIMIT) +cache = None +if os.environ.get('NICONICOGAY_DISABLE_CACHE', '') != '1': + Cache("disk_cache", size_limit=CACHE_SIZE_LIMIT) + logger.info("Using disk cache") +else: + logger.info("Disk cache disabled") user_session = None cookie_jar = http.cookiejar.MozillaCookieJar('cookies.txt')