From 51a27b6f400625cb0137e1394de1056ea5fb682b Mon Sep 17 00:00:00 2001 From: Bobby Date: Tue, 3 Sep 2024 12:20:35 -0400 Subject: optimizations --- watch/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'watch/utils.py') diff --git a/watch/utils.py b/watch/utils.py index 609ff1a..150213d 100644 --- a/watch/utils.py +++ b/watch/utils.py @@ -74,10 +74,10 @@ def get_anime_user_history(user, anime_id): return history -def store_in_redis_cache(anime_id, data): +def store_in_redis_cache(anime_id, data, cache_time=60*60*12): try: print("Storing in cache=>", anime_id) - r.set(anime_id, data, ex=60*60*12) # 1 hour + r.set(anime_id, data, ex=cache_time) # 1 hour except Exception as e: print(e) pass -- cgit v1.2.3