diff --git a/app.py b/app.py index 4807747..bdadcd0 100644 --- a/app.py +++ b/app.py @@ -36,7 +36,7 @@ CACHE_SIZE_LIMIT = 100 * 1024 * 1024 # 100 MB cache = None if os.environ.get('NICONICOGAY_DISABLE_CACHE', '') != '1': - Cache("disk_cache", size_limit=CACHE_SIZE_LIMIT) + cache = Cache("disk_cache", size_limit=CACHE_SIZE_LIMIT) logger.info("Using disk cache") else: logger.info("Disk cache disabled") @@ -364,6 +364,7 @@ if you want to download videos, please consider using a tool like nndownload: ht logging.info(f"Caching response for video ID: {video_id}") cache.set(video_id, html_response, expire=CACHE_EXPIRATION_SECONDS) + logging.info(f"Returning response for video ID: {video_id}") return Response(html_response, mimetype="text/html") @app.route("/owoembed")