bugfix: cache entry invalidation

- davkey has no "cls" argument
- needs explicit slice
This commit is contained in:
Jörn-Michael Miehe 2023-11-22 00:10:37 +01:00
parent 77dd575e72
commit b734dee575

View file

@ -95,7 +95,8 @@ class WebDAV:
cls._webdav_client.upload_to(buffer, path)
# invalidate cache entry
cls._cache.pop(davkey("read_bytes")(path))
# explicit slice as there is no "cls" argument
del cls._cache[davkey("read_bytes", slice(0, None))(path)]
@classmethod
async def write_str(cls, path: str, content: str, encoding="utf-8") -> None: