@locking
    def set(self, key, value, timeout=None):
        '''Set a value in the cache. If timeout is given, that timeout will be
        used for the key; otherwise the default cache timeout will be used.
        '''

        if len(self.storage) >= self.max_entries:
            self.cull()
        if timeout is None:
            timeout = self.default_timeout
        self.storage[repr(key)] = value
        self.expire_info[repr(key)] = time.time() + timeout
dataset/ETHPy150Open onitu/onitu/drivers/flickr/onitu_flickr/flickrapi/cache.py/SimpleCache.set/original