diff options
| author | Bobby <[email protected]> | 2024-09-03 12:20:35 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2024-09-03 12:20:35 -0400 |
| commit | 51a27b6f400625cb0137e1394de1056ea5fb682b (patch) | |
| tree | 593b782d99784c690705eb397831a9a681d406a3 /watch/utils.py | |
| parent | a9e71a492486a25ec4273716080e0ca744a36646 (diff) | |
| download | yugen-51a27b6f400625cb0137e1394de1056ea5fb682b.tar.xz yugen-51a27b6f400625cb0137e1394de1056ea5fb682b.zip | |
optimizations
Diffstat (limited to 'watch/utils.py')
| -rw-r--r-- | watch/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
