Commit a02be42e authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

[cubicweb/utils] add QueryCache.__contains__() to improve dict-like behavior. Closes #255426

parent 3cf37ec616ad
......@@ -616,6 +616,9 @@ class QueryCache(object):
self._data = {}
self._lock = Lock()
def __contains__(self, key):
return key in self._data
def __len__(self):
with self._lock:
return len(self._data)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment