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:
Erik Johnston 2017-06-29 14:08:33 +01:00
parent 731f3c37a0
commit c72058bcc6
2 changed files with 13 additions and 11 deletions

View file

@ -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]