diff options
author | Erik Johnston <erik@matrix.org> | 2021-04-01 16:50:08 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2021-04-01 16:50:08 +0100 |
commit | 3d6c982c4111376b5295a101d22979e753dcb5b9 (patch) | |
tree | 72e96f10d8b0256ce8f09618f8d5448b54e5df70 | |
parent | Merge remote-tracking branch 'origin/develop' into erikj/cache_memory_usage (diff) | |
download | synapse-3d6c982c4111376b5295a101d22979e753dcb5b9.tar.xz |
Randomise
-rw-r--r-- | synapse/util/caches/lrucache.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py index e0c0e41a55..be9cb92735 100644 --- a/synapse/util/caches/lrucache.py +++ b/synapse/util/caches/lrucache.py @@ -27,6 +27,7 @@ from typing import ( cast, overload, ) +import random from typing_extensions import Literal @@ -87,7 +88,7 @@ class _Node: self.prev_node = prev_node self.next_node = next_node - self.allocated_ts = int(reactor.seconds()) + self.allocated_ts = int(reactor.seconds()) + random.randint(-30, 30) class LruCache(Generic[KT, VT]): |