code: def _purge_expired(self):
          
          time_horizon = time.time() - self._keep_time
          new_cache = {}
          for (k, v) in self._cache.items():
              if v.timestamp > time_horizon:
                  new_cache[k] = v
          self._cache = new_cache
docs: Remove all expired entries from the cache.