From 24f289e464593d31135c3e1d976bf80f2011eeb4 Mon Sep 17 00:00:00 2001 From: ATTomatoo <1126160939@qq.com> Date: Sat, 5 Jul 2025 23:38:40 +0800 Subject: [PATCH] pyd2 --- zhenxun/services/cache.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zhenxun/services/cache.py b/zhenxun/services/cache.py index 071af501..f90f5c45 100644 --- a/zhenxun/services/cache.py +++ b/zhenxun/services/cache.py @@ -582,13 +582,14 @@ class CacheManager: if _name in self._data: raise DbCacheException(f"缓存 {name} 已存在") - self._data[_name] = CacheData( + cache_data = CacheData( name=_name, func=func, expire=expire, lazy_load=lazy_load, - _cache=self._cache, ) + cache_data._cache = self._cache + self._data[_name] = cache_data return func return wrapper