mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-03 19:00:00 +08:00
fix: remove duplicate prefix in cache keys (CacheType already provides prefix)
This commit is contained in:
+9
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user