mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:16:09 -04:00
Use an ExpiringCache for storing registration sessions
This is because pruning them was a significant performance drain on matrix.org
This commit is contained in:
parent
731f3c37a0
commit
c72058bcc6
2 changed files with 13 additions and 11 deletions
|
@ -94,6 +94,9 @@ class ExpiringCache(object):
|
|||
|
||||
return entry.value
|
||||
|
||||
def __contains__(self, key):
|
||||
return key in self._cache
|
||||
|
||||
def get(self, key, default=None):
|
||||
try:
|
||||
return self[key]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue