mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-12 03:40:02 -04:00
Revert all the bits changing keys of eeverything that used LRUCaches to tuples
This commit is contained in:
parent
10f76dc5da
commit
d552861346
5 changed files with 44 additions and 44 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue