summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-01-22 12:18:14 +0000
committerDavid Baker <dave@matrix.org>2016-01-22 12:18:14 +0000
commitd552861346d6f2f3d50fa0aff3e239d17cf9b7c0 (patch)
tree4cd93b237f60276f5a9735c365b5d80c3f1df47e /synapse/push
parentMake LRU cache not default to treecache & add options to use it (diff)
downloadsynapse-d552861346d6f2f3d50fa0aff3e239d17cf9b7c0.tar.xz
Revert all the bits changing keys of eeverything that used LRUCaches to tuples
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/push_rule_evaluator.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/push/push_rule_evaluator.py b/synapse/push/push_rule_evaluator.py

index 27b0de4f66..dca018af95 100644 --- a/synapse/push/push_rule_evaluator.py +++ b/synapse/push/push_rule_evaluator.py
@@ -309,14 +309,14 @@ def _flatten_dict(d, prefix=[], result={}): return result -regex_cache = LruCache(5000, 1) +regex_cache = LruCache(5000) def _compile_regex(regex_str): - r = regex_cache.get((regex_str,), None) + r = regex_cache.get(regex_str, None) if r: return r r = re.compile(regex_str, flags=re.IGNORECASE) - regex_cache[(regex_str,)] = r + regex_cache[regex_str] = r return r