code: def ttl_cache(maxsize=128, ttl=600, timer=default_timer, typed=False):
      
      if maxsize is None:
          return _cache(_UnboundTTLCache(ttl, timer), typed)
      else:
          return _cache(TTLCache(maxsize, ttl, timer), typed)
docs: Decorator to wrap a function with a memoizing callable that saves
      up to `maxsize` results based on a Least Recently Used (LRU)
      algorithm with a per-item time-to-live (TTL) value.