diff options
author | David Baker <dave@matrix.org> | 2016-01-22 12:21:13 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-01-22 12:21:13 +0000 |
commit | cd80019eec69172f9753e0da25ad22d2f7c434db (patch) | |
tree | 27f4ea51e7b158ebe9524b5cbf524bf485ffa863 /synapse/util | |
parent | Revert all the bits changing keys of eeverything that used LRUCaches to tuples (diff) | |
download | synapse-cd80019eec69172f9753e0da25ad22d2f7c434db.tar.xz |
docs
Diffstat (limited to '')
-rw-r--r-- | synapse/util/caches/lrucache.py | 6 |
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 |