summary refs log tree commit diff
path: root/synapse/push/push_rule_evaluator.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/push/push_rule_evaluator.py')
-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