code: func newTimedcache(ttl time.Duration, getter getFunc) (*timedCache, error) {
  	if getter == nil {
  		return nil, fmt.Errorf("getter is not provided")
  	}
  
  	return &timedCache{
  		getter: getter,
  		store:  cache.NewTTLStore(cacheKeyFunc, ttl),
  	}, nil
  }
docs: // newTimedcache creates a new timedCache.