diff options
author | Ben Banfield-Zanin <benbz@matrix.org> | 2020-09-15 11:44:49 +0100 |
---|---|---|
committer | Ben Banfield-Zanin <benbz@matrix.org> | 2020-09-15 11:44:49 +0100 |
commit | 1a7d96aa6ff81638f2ea696fdee2ec44e7bff75a (patch) | |
tree | 1839e80f89c53b34ff1b36974305c6cb0c94aab4 /synapse/util/caches/ttlcache.py | |
parent | Fix group server for older synapse (diff) | |
parent | Clarify changelog. (diff) | |
download | synapse-bbz/info-mainline-1.20.0.tar.xz |
Merge remote-tracking branch 'origin/release-v1.20.0' into bbz/info-mainline-1.20.0 github/bbz/info-mainline-1.20.0 bbz/info-mainline-1.20.0
Diffstat (limited to 'synapse/util/caches/ttlcache.py')
-rw-r--r-- | synapse/util/caches/ttlcache.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/util/caches/ttlcache.py b/synapse/util/caches/ttlcache.py index 6437aa907e..3e180cafd3 100644 --- a/synapse/util/caches/ttlcache.py +++ b/synapse/util/caches/ttlcache.py @@ -26,7 +26,7 @@ logger = logging.getLogger(__name__) SENTINEL = object() -class TTLCache(object): +class TTLCache: """A key/value cache implementation where each entry has its own TTL""" def __init__(self, cache_name, timer=time.time): @@ -154,7 +154,7 @@ class TTLCache(object): @attr.s(frozen=True, slots=True) -class _CacheEntry(object): +class _CacheEntry: """TTLCache entry""" # expiry_time is the first attribute, so that entries are sorted by expiry. |