def add_result(self, key, result):
        """Add result object to cache with given key.
        The request is ignored when the cache is already full or the key
        is None.
        """
        if len(self.cache) > self.max_size:
            return
        if key is not None:
            self.cache[key] = result
Add result object to cache with given key.
        The request is ignored when the cache is already full or the key
        is None.