From 74e000c96b1e48f7e09b1a0001c8faa890289a6e Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 30 May 2024 19:29:57 +0300 Subject: [PATCH] cache-refactored-3 --- services/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/cache.py b/services/cache.py index 5a21ea45..0f2b2240 100644 --- a/services/cache.py +++ b/services/cache.py @@ -171,7 +171,7 @@ async def get_cached_author_follows_authors(author_id: int): ) with local_session() as session: authors_ids = session.execute(authors_query) - await redis.execute("SET", rkey, json.dumps([aid for aid in authors_ids])) + await redis.execute("SET", rkey, json.dumps([int(f"{aid}") for aid in authors_ids])) elif isinstance(cached, str): authors_ids = json.loads(cached) return await get_cached_authors_by_ids(authors_ids)