✨feat(core): 优化数据库调用表现 (#2089)

This commit is contained in:
ManyManyTomato
2026-02-01 14:28:51 +08:00
committed by GitHub
parent 7890b39002
commit 203754e300
10 changed files with 341 additions and 44 deletions
+5 -2
View File
@@ -1092,8 +1092,11 @@ class Cache(Generic[T]):
@driver.on_startup
async def _():
CacheRoot.enabled = True
logger.info("缓存系统已启用", LOG_COMMAND)
CacheRoot.enabled = cache_config.cache_mode != CacheMode.NONE
if CacheRoot.enabled:
logger.info("缓存系统已启用", LOG_COMMAND)
else:
logger.info("缓存系统已禁用", LOG_COMMAND)
@driver.on_shutdown