feat: add TEMP cache type and enhance user and bot management with improved error handling and caching mechanisms

This commit is contained in:
HibiKier
2025-12-22 10:16:02 +08:00
parent 632dff3bad
commit a3cbfefaa1
6 changed files with 108 additions and 75 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ def register_cache_types():
CacheType.LEVEL, LevelUser, key_format="{user_id}_{group_id}"
)
CacheRegistry.register(CacheType.BAN, BanConsole, key_format="{user_id}_{group_id}")
CacheRegistry.register(CacheType.TEMP, None, 3600)
if cache_config.cache_mode == CacheMode.NONE:
logger.info("缓存功能已禁用,将直接从数据库获取数据")
else: