Fix subscription checkout resume after top-ups

This commit is contained in:
Egor
2025-09-19 10:54:16 +03:00
parent 719d656a64
commit 57cc2d2e3a
8 changed files with 369 additions and 257 deletions
+8 -3
View File
@@ -203,14 +203,19 @@ class UserCache:
@staticmethod
async def set_user_session(
user_id: int,
session_key: str,
data: Any,
user_id: int,
session_key: str,
data: Any,
expire: int = 1800
) -> bool:
key = cache_key("session", user_id, session_key)
return await cache.set(key, data, expire)
@staticmethod
async def delete_user_session(user_id: int, session_key: str) -> bool:
key = cache_key("session", user_id, session_key)
return await cache.delete(key)
class SystemCache: