{"record":{"id":"a2a0357ed4e70df0","repo":"thanos-io/thanos","slug":"response-cache-with-type-s-is-not-supported","errorCode":null,"errorMessage":"response cache with type %s is not supported","messagePattern":"response cache with type (.+?) is not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/queryfrontend/config.go","lineNumber":181,"sourceCode":"\t\treturn &cortexcache.Config{\n\t\t\tRedis: cortexcache.RedisConfig{\n\t\t\t\tEndpoint:           config.Redis.Addr,\n\t\t\t\tTimeout:            config.Redis.ReadTimeout,\n\t\t\t\tMasterName:         config.Redis.MasterName,\n\t\t\t\tExpiration:         config.Expiration,\n\t\t\t\tDB:                 config.Redis.DB,\n\t\t\t\tPassword:           flagext.Secret{Value: config.Redis.Password},\n\t\t\t\tUsername:           config.Redis.Username,\n\t\t\t\tEnableTLS:          config.Redis.TLSEnabled,\n\t\t\t\tInsecureSkipVerify: config.Redis.TLSConfig.InsecureSkipVerify,\n\t\t\t},\n\t\t\tBackground: cortexcache.BackgroundConfig{\n\t\t\t\tWriteBackBuffer:     config.Redis.MaxSetMultiConcurrency * config.Redis.SetMultiBatchSize,\n\t\t\t\tWriteBackGoroutines: config.Redis.MaxSetMultiConcurrency,\n\t\t\t},\n\t\t}, nil\n\tdefault:\n\t\treturn nil, errors.Errorf(\"response cache with type %s is not supported\", cacheConfig.Type)\n\t}\n}\n\n// DownstreamTripperConfig stores the http.Transport configuration for query-frontend's HTTP downstream tripper.\ntype DownstreamTripperConfig struct {\n\tIdleConnTimeout       prommodel.Duration `yaml:\"idle_conn_timeout\"`\n\tResponseHeaderTimeout prommodel.Duration `yaml:\"response_header_timeout\"`\n\tTLSHandshakeTimeout   prommodel.Duration `yaml:\"tls_handshake_timeout\"`\n\tExpectContinueTimeout prommodel.Duration `yaml:\"expect_continue_timeout\"`\n\tMaxIdleConns          *int               `yaml:\"max_idle_conns\"`\n\tMaxIdleConnsPerHost   *int               `yaml:\"max_idle_conns_per_host\"`\n\tMaxConnsPerHost       *int               `yaml:\"max_conns_per_host\"`\n\tTLSConfig             *exthttp.TLSConfig `yaml:\"tls_config\"`\n\n\tCachePathOrContent extflag.PathOrContent\n}\n\n// Config holds the query frontend configs.","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/queryfrontend/config.go#L163-L199","documentation":"NewCacheConfig switches on the configured cache type (INMEMORY, MEMCACHED, REDIS). Any other value reaches the default branch and returns 'response cache with type %s is not supported'. Thanos only supports these three response-cache backends for the query frontend.","triggerScenarios":"CacheProviderConfig.Type in the YAML (compared via strings.ToUpper) is not INMEMORY, MEMCACHED, or REDIS — e.g. a misspelled backend or one supported in Cortex but not Thanos.","commonSituations":"Typo like 'memcache' or 'in_memory', copying a Cortex cache config with unsupported backends, or assuming bigcache/other Cortex backends work in Thanos.","solutions":["Set type to one of: INMEMORY, MEMCACHED, REDIS (case-insensitive).","Check spelling and exact backend names in the Thanos query-frontend cache docs.","If you need another backend, use a supported one or contribute a provider; Cortex-only backends are not wired in Thanos."],"exampleFix":"# before\ntype: BIGCACHE\n# after\ntype: INMEMORY","handlingStrategy":"validation","validationCode":"var p struct{ Type string `yaml:\"type\"` }\n_ = yaml.Unmarshal(data, &p)\nswitch strings.ToUpper(p.Type) {\ncase \"INMEMORY\", \"MEMCACHED\", \"REDIS\":\ndefault:\n    return fmt.Errorf(\"unsupported cache type %q; use INMEMORY, MEMCACHED or REDIS\", p.Type)\n}","typeGuard":null,"tryCatchPattern":"_, err := queryfrontend.NewCacheConfig(logger, yamlBytes)\nif err != nil && strings.Contains(err.Error(), \"is not supported\") {\n    return fmt.Errorf(\"fix cache type; see docs: %w\", err)\n}","preventionTips":["Use only INMEMORY, MEMCACHED, REDIS as cache type.","Don't copy cache backends from Cortex or other projects.","Validate the type field in config linters/CI."],"tags":["config","cache","invalid-enum","query-frontend"],"backgroundTag":"invalid-enum-value","analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}