mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-11 22:14:19 -05:00
Comment
This commit is contained in:
parent
9efcc3f3be
commit
6b61060b51
@ -479,7 +479,10 @@ class CacheListDescriptor(object):
|
|||||||
|
|
||||||
class _CacheContext(namedtuple("_CacheContext", ("cache", "key"))):
|
class _CacheContext(namedtuple("_CacheContext", ("cache", "key"))):
|
||||||
# We rely on _CacheContext implementing __eq__ and __hash__ sensibly,
|
# We rely on _CacheContext implementing __eq__ and __hash__ sensibly,
|
||||||
# which namedtuple does for us.
|
# 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):
|
def invalidate(self):
|
||||||
self.cache.invalidate(self.key)
|
self.cache.invalidate(self.key)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user