'Set the cached value for the given key.'

def __setitem__(self, key, value):

    existing = self.get(key)
    dict.__setitem__(self, key, value)
    if isinstance(existing, Event):
        existing.result = value
        existing.set()
