add clear method

This commit is contained in:
long2ice
2020-11-03 18:08:06 +08:00
parent dc2ac9cc90
commit e483e0dc55
6 changed files with 40 additions and 2 deletions

View File

@@ -14,3 +14,7 @@ class Backend:
@abc.abstractmethod
async def set(self, key: str, value: str, expire: int = None):
raise NotImplementedError
@abc.abstractmethod
async def clear(self, namespace: str = None, key: str = None) -> int:
raise NotImplementedError