<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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