Skip to content
Snippets Groups Projects
Commit 6b61060b authored by Erik Johnston's avatar Erik Johnston
Browse files

Comment

parent 9efcc3f3
No related branches found
Tags v1.21.0rc3
No related merge requests found
......@@ -479,7 +479,10 @@ class CacheListDescriptor(object):
class _CacheContext(namedtuple("_CacheContext", ("cache", "key"))):
# 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):
self.cache.invalidate(self.key)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment