code: func (s *cachingCredentialsSource) ForHost(host svchost.Hostname) (HostCredentials, error) {
  	if cache, cached := s.cache[host]; cached {
  		return cache, nil
  	}
  
  	result, err := s.source.ForHost(host)
  	if err != nil {
  		return result, err
  	}
  
  	s.cache[host] = result
  	return result, nil
  }
docs: // ForHost passes the given hostname on to the wrapped credentials source and
  // caches the result to return for future requests with the same hostname.
  //
  // Both credentials and non-credentials (nil) responses are cached.
  //
  // No cache entry is created if the wrapped source returns an error, to allow
  // the caller to retry the failing operation.