diff --git a/api/advent22_api/core/webdav.py b/api/advent22_api/core/webdav.py index 78daf60..117b7b4 100644 --- a/api/advent22_api/core/webdav.py +++ b/api/advent22_api/core/webdav.py @@ -17,7 +17,7 @@ class WebDAV: ) @classmethod - @AsyncTTL(time_to_live=SETTINGS.webdav.cache_ttl) + @AsyncTTL(time_to_live=SETTINGS.webdav.cache_ttl, skip_args=1) async def list_files( cls, directory: str = "", @@ -33,7 +33,7 @@ class WebDAV: return [f"{directory}/{path}" for path in ls if regex.search(path)] @classmethod - @AsyncTTL(time_to_live=SETTINGS.webdav.cache_ttl) + @AsyncTTL(time_to_live=SETTINGS.webdav.cache_ttl, skip_args=1) async def file_exists(cls, path: str) -> bool: """ `True`, wenn an Pfad `path` eine Datei existiert @@ -42,7 +42,7 @@ class WebDAV: return cls._webdav_client.check(path) @classmethod - @AsyncTTL(time_to_live=SETTINGS.webdav.cache_ttl) + @AsyncTTL(time_to_live=SETTINGS.webdav.cache_ttl, skip_args=1) async def read_bytes(cls, path: str) -> bytes: """ Datei aus Pfad `path` als bytes laden @@ -55,7 +55,6 @@ class WebDAV: return buffer.read() @classmethod - @AsyncTTL(time_to_live=SETTINGS.webdav.cache_ttl) async def read_str(cls, path: str, encoding="utf-8") -> str: """ Datei aus Pfad `path` als string laden