summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-01-22 12:21:13 +0000
committerDavid Baker <dave@matrix.org>2016-01-22 12:21:13 +0000
commitcd80019eec69172f9753e0da25ad22d2f7c434db (patch)
tree27f4ea51e7b158ebe9524b5cbf524bf485ffa863 /synapse/util
parentRevert all the bits changing keys of eeverything that used LRUCaches to tuples (diff)
downloadsynapse-cd80019eec69172f9753e0da25ad22d2f7c434db.tar.xz
docs
Diffstat (limited to '')
-rw-r--r--synapse/util/caches/lrucache.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py
index 5f9405c95f..cc6c25a712 100644
--- a/synapse/util/caches/lrucache.py
+++ b/synapse/util/caches/lrucache.py
@@ -28,7 +28,11 @@ def enumerate_leaves(node, depth):
 
 
 class LruCache(object):
-    """Least-recently-used cache."""
+    """
+    Least-recently-used cache.
+    Supports del_multi only if cache_type=TreeCache
+    If cache_type=TreeCache, all keys must be tuples.
+    """
     def __init__(self, max_size, keylen=1, cache_type=dict):
         cache = cache_type()
         self.size = 0