code: func (a *cachedTokenAuthenticator) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) {
  	auds, _ := authenticator.AudiencesFrom(ctx)
  
  	key := keyFunc(auds, token)
  	if record, ok := a.cache.get(key); ok {
  		return record.resp, record.ok, record.err
  	}
  
  	resp, ok, err := a.authenticator.AuthenticateToken(ctx, token)
  	if !a.cacheErrs && err != nil {
  		return resp, ok, err
  	}
  
  	switch {
  	case ok && a.successTTL > 0:
  		a.cache.set(key, &cacheRecord{resp: resp, ok: ok, err: err}, a.successTTL)
  	case !ok && a.failureTTL > 0:
  		a.cache.set(key, &cacheRecord{resp: resp, ok: ok, err: err}, a.failureTTL)
  	}
  
  	return resp, ok, err
  }
docs: // AuthenticateToken implements authenticator.Token