Add diskcache logging
This commit is contained in:
parent
6e95c1dd52
commit
246de3e29d
7
app.py
7
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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user