fix: remove duplicate prefix in cache keys (CacheType already provides prefix)

This commit is contained in:
HibiKier
2025-12-30 15:16:40 +08:00
parent 358c7f502c
commit 2ccd05f4cf
2 changed files with 18 additions and 9 deletions
+9
View File
@@ -138,6 +138,15 @@ class CacheDict(Generic[T]):
return data.value
def delete(self, key: str) -> None:
"""删除字典项
参数:
key: 字典键
"""
if key in self._data:
del self._data[key]
def clear(self) -> None:
"""清空字典"""
self._data.clear()