diff options
author | Erik Johnston <erik@matrix.org> | 2017-02-02 16:50:28 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-02-02 16:50:28 +0000 |
commit | f8c407a13b04f906dc761bcf33992e05af219098 (patch) | |
tree | 0479c242f3d7df94437755296616e657a0a15858 /synapse/util | |
parent | Update changelog (diff) | |
parent | Merge pull request #1877 from matrix-org/erikj/device_list_fixes (diff) | |
download | synapse-f8c407a13b04f906dc761bcf33992e05af219098.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into release-v0.19.0
Diffstat (limited to '')
-rw-r--r-- | synapse/util/caches/descriptors.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/util/caches/descriptors.py b/synapse/util/caches/descriptors.py index 675bfd5feb..998de70d29 100644 --- a/synapse/util/caches/descriptors.py +++ b/synapse/util/caches/descriptors.py @@ -478,6 +478,11 @@ class CacheListDescriptor(object): class _CacheContext(namedtuple("_CacheContext", ("cache", "key"))): + # We rely on _CacheContext implementing __eq__ and __hash__ sensibly, + # which namedtuple does for us (i.e. two _CacheContext are the same if + # their caches and keys match). This is important in particular to + # dedupe when we add callbacks to lru cache nodes, otherwise the number + # of callbacks would grow. def invalidate(self): self.cache.invalidate(self.key) |