소스 검색

fix: 修复write_role_operate_to_cache的key错误

SongZihuan 2 년 전
부모
커밋
b28b12760a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      sql/cache.py

+ 1 - 1
sql/cache.py

@@ -387,7 +387,7 @@ def get_role_operate_from_cache(role_id: int, operate: str):
 
 @__try_redis(None)
 def write_role_operate_to_cache(role_id: int, operate: str, res: bool):
-    cache_name = f"{CACHE_PREFIX}:operate:{role_id}:{operate}:"
+    cache_name = f"{CACHE_PREFIX}:operate:{role_id}:{operate}"
     cache.set(cache_name, str(res))
     cache.expire(cache_name, CACHE_TIME)