Thread-safe delete

This commit is contained in:
Nuno Campos
2025-05-08 16:49:01 -07:00
parent 1d977f1c09
commit a11a62e68f
+1 -2
View File
@@ -37,8 +37,7 @@ class FileCache(BaseCache):
def delete(self, keys: list[str]) -> None:
"""Delete the cached values for the given keys."""
for key in keys:
if key in self._db:
del self._db[key]
self._db.pop(key, None)
async def aget(self, keys: list[str]) -> dict[str, bytes]:
"""Asynchronously get the cached values for the given keys."""