parameters: (self, key, value)
docstring: Set the cached value for the given key.
docstring_summary: Set the cached value for the given key.
docstring_tokens: Set the cached value for the given key .
function: def __setitem__(self, key, value):
          """Set the cached value for the given key."""
          existing = self.get(key)
          dict.__setitem__(self, key, value)
          if isinstance(existing, threading.Event):
              # Set Event.result so other threads waiting on it have
              # immediate access without needing to poll the cache again.
              existing.result = value
              existing.set()
function_tokens: def __setitem__ ( self , key , value ) : existing = self . get ( key ) dict . __setitem__ ( self , key , value ) if isinstance ( existing , threading . Event ) : # Set Event.result so other threads waiting on it have # immediate access without needing to poll the cache again. existing . result = value existing . set ( )