From b734dee575a2b55ab4de838b541dec8bb170ed4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Wed, 22 Nov 2023 00:10:37 +0100 Subject: [PATCH] bugfix: cache entry invalidation - davkey has no "cls" argument - needs explicit slice --- api/advent22_api/core/dav/webdav.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/advent22_api/core/dav/webdav.py b/api/advent22_api/core/dav/webdav.py index acb5097..2e60a16 100644 --- a/api/advent22_api/core/dav/webdav.py +++ b/api/advent22_api/core/dav/webdav.py @@ -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: