feat: 更新消息管理和数据库操作日志,增强调试信息
This commit is contained in:
@@ -149,7 +149,6 @@ class CRUDBase:
|
||||
cache = await get_cache()
|
||||
cached_dict = await cache.get(cache_key)
|
||||
if cached_dict is not None:
|
||||
logger.debug(f"缓存命中: {cache_key}")
|
||||
# 从字典恢复对象
|
||||
return _dict_to_model(self.model, cached_dict)
|
||||
|
||||
@@ -194,7 +193,6 @@ class CRUDBase:
|
||||
cache = await get_cache()
|
||||
cached_dict = await cache.get(cache_key)
|
||||
if cached_dict is not None:
|
||||
logger.debug(f"缓存命中: {cache_key}")
|
||||
# 从字典恢复对象
|
||||
return _dict_to_model(self.model, cached_dict)
|
||||
|
||||
@@ -247,7 +245,6 @@ class CRUDBase:
|
||||
cache = await get_cache()
|
||||
cached_dicts = await cache.get(cache_key)
|
||||
if cached_dicts is not None:
|
||||
logger.debug(f"缓存命中: {cache_key}")
|
||||
# 从字典列表恢复对象列表
|
||||
return [_dict_to_model(self.model, d) for d in cached_dicts]
|
||||
|
||||
|
||||
@@ -199,7 +199,6 @@ class QueryBuilder(Generic[T]):
|
||||
cache = await get_cache()
|
||||
cached_dicts = await cache.get(cache_key)
|
||||
if cached_dicts is not None:
|
||||
logger.debug(f"缓存命中: {cache_key}")
|
||||
dict_rows = [dict(row) for row in cached_dicts]
|
||||
if as_dict:
|
||||
return dict_rows
|
||||
@@ -238,7 +237,6 @@ class QueryBuilder(Generic[T]):
|
||||
cache = await get_cache()
|
||||
cached_dict = await cache.get(cache_key)
|
||||
if cached_dict is not None:
|
||||
logger.debug(f"缓存命中: {cache_key}")
|
||||
row = dict(cached_dict)
|
||||
if as_dict:
|
||||
return row
|
||||
@@ -277,7 +275,6 @@ class QueryBuilder(Generic[T]):
|
||||
cache = await get_cache()
|
||||
cached = await cache.get(cache_key)
|
||||
if cached is not None:
|
||||
logger.debug(f"缓存命中: {cache_key}")
|
||||
return cached
|
||||
|
||||
# 构建count查询
|
||||
|
||||
@@ -192,7 +192,6 @@ def cached(
|
||||
cached_result = await cache.get(cache_key)
|
||||
|
||||
if cached_result is not None:
|
||||
logger.debug(f"缓存命中: {cache_key}")
|
||||
return cached_result
|
||||
|
||||
# 执行函数
|
||||
|
||||
Reference in New Issue
Block a user