From 6e73a1bebff4b28138f0514bef5512c5b58a8c3e Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 29 Apr 2018 21:39:07 +0200 Subject: [PATCH] Don't reuse cache locks between instances of class --- radicale/storage.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/radicale/storage.py b/radicale/storage.py index 9f758b3..56e8b21 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -761,6 +761,10 @@ class Collection(BaseCollection): "storage", "filesystem_close_lock_file") cls._lock = FileBackedRwLock(lock_path, close_lock_file) + # init cache lock + cls._cache_locks = {} + cls._cache_locks_lock = threading.Lock() + def __init__(self, path, principal=None, folder=None, filesystem_path=None): # DEPRECATED: Remove principal and folder attributes @@ -1309,9 +1313,6 @@ class Collection(BaseCollection): pass return content - _cache_locks = {} - _cache_locks_lock = threading.Lock() - @contextmanager def _acquire_cache_lock(self, ns=""): if "/" in ns: