Clean item cache once per request

This commit is contained in:
Unrud 2017-07-27 19:08:05 +02:00
parent 0a1de26ae5
commit 796ba54f42

View File

@ -733,6 +733,7 @@ class Collection(BaseCollection):
"VObject version not found: %s", e, exc_info=True) "VObject version not found: %s", e, exc_info=True)
vobject_version = "" vobject_version = ""
Collection._item_cache_tag = vobject_version.encode() + b"\0" Collection._item_cache_tag = vobject_version.encode() + b"\0"
self._item_cache_cleaned = False
@classmethod @classmethod
def _get_collection_root_folder(cls): def _get_collection_root_folder(cls):
@ -1173,8 +1174,6 @@ class Collection(BaseCollection):
continue continue
yield href yield href
_item_cache_cleaned = False
def get(self, href, verify_href=True): def get(self, href, verify_href=True):
item, metadata = self._get_with_metadata(href, verify_href=verify_href) item, metadata = self._get_with_metadata(href, verify_href=verify_href)
return item return item