code: func fetchCachedSettings(c context.Context) tsmonSettings {
  	s := tsmonSettings{}
  	switch err := settings.Get(c, settingsKey, &s); {
  	case err == nil:
  		return s
  	case err == settings.ErrNoSettings:
  		return defaultSettings
  	default:
  		panic(fmt.Errorf("could not fetch tsmon settings - %s", err))
  	}
  }
docs: // fetchCachedSettings fetches tsmonSettings from the settings store or panics.
  //
  // Uses in-process global cache to avoid hitting datastore often. The cache
  // expiration time is 1 min (see gaesettings.expirationTime), meaning
  // the instance will refetch settings once a minute (blocking only one unlucky
  // request to do so).
  //
  // Panics only if there's no cached value (i.e. it is the first call to this
  // function in this process ever) and datastore operation fails. It is usually
  // very unlikely.