in internal/server/server.go [161:175]
func getConfCacheTTL() time.Duration {
// ensure the conf cached in the runner expires after the token in APISIX
amplificationFactor := 1.2
ttl := os.Getenv(ConfCacheTTLEnv)
if ttl == "" {
return time.Duration(3600*amplificationFactor) * time.Second
}
n, err := strconv.Atoi(ttl)
if err != nil || n <= 0 {
log.Errorf("invalid cache ttl: %s", ttl)
return 0
}
return time.Duration(float64(n)*amplificationFactor) * time.Second
}