diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-05-27 10:33:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 10:33:56 +0100 |
commit | 224f2f949b1661094a64d1105efb64159ddf4aa0 (patch) | |
tree | 9bea5176fea22200691fac70160b2490018d8b6f /synapse/util/caches/treecache.py | |
parent | Remove the experimental spaces enabled flag. (#10063) (diff) | |
download | synapse-224f2f949b1661094a64d1105efb64159ddf4aa0.tar.xz |
Combine `LruCache.invalidate` and `invalidate_many` (#9973)
* Make `invalidate` and `invalidate_many` do the same thing ... so that we can do either over the invalidation replication stream, and also because they always confused me a bit. * Kill off `invalidate_many` * changelog
Diffstat (limited to 'synapse/util/caches/treecache.py')
-rw-r--r-- | synapse/util/caches/treecache.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/util/caches/treecache.py b/synapse/util/caches/treecache.py index 73502a8b06..a6df81ebff 100644 --- a/synapse/util/caches/treecache.py +++ b/synapse/util/caches/treecache.py @@ -89,6 +89,9 @@ class TreeCache: value. If the key is partial, the TreeCacheNode corresponding to the part of the tree that was removed. """ + if not isinstance(key, tuple): + raise TypeError("The cache key must be a tuple not %r" % (type(key),)) + # a list of the nodes we have touched on the way down the tree nodes = [] |