{"record":{"id":"f02ec9088237b42b","repo":"quarkusio/quarkus","slug":"unknown-cache-type","errorCode":null,"errorMessage":"Unknown cache type: ","messagePattern":"Unknown cache type: ","errorType":"error_code","errorClass":"DeploymentException","httpStatus":null,"severity":"error","filePath":"extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/CacheManagerRecorder.java","lineNumber":87,"sourceCode":"                    !cacheTypeBuildConfig.type().isEmpty()) {\n                cacheTypeByName.put(cacheName, cacheTypeBuildConfig.type());\n            } else {\n                // if not, use the default cache type defined \"quarkus.cache.type\"\n                cacheTypeByName.put(cacheName, cacheBuildConfig.type());\n            }\n        }\n        return cacheTypeByName;\n    }\n\n    private Supplier<CacheManager> findSupplierForType(\n            CacheManagerInfo.Context context,\n            Collection<CacheManagerInfo> infos) {\n        for (CacheManagerInfo info : infos) {\n            if (info.supports(context)) {\n                return info.get(context);\n            }\n        }\n        throw new DeploymentException(\"Unknown cache type: \" + context.cacheType());\n    }\n\n    private Map<String, Supplier<CacheManager>> createCacheSupplierByCacheType(\n            Collection<CacheManagerInfo> infos,\n            List<String> cacheNames,\n            boolean micrometerMetricsEnabled) {\n\n        Map<String, String> cacheTypeByCacheName = mapCacheTypeByCacheName(cacheNames);\n\n        // create one context per cache type with their corresponding list of cache names\n        Map<String, CacheManagerInfo.Context> contextByCacheType = new HashMap<>();\n        for (String cacheName : cacheNames) {\n            contextByCacheType.computeIfAbsent(\n                    cacheTypeByCacheName.get(cacheName),\n                    cacheType -> this.createContextForCacheType(cacheType, micrometerMetricsEnabled))\n                    .cacheNames()\n                    .add(cacheName);\n        }","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/CacheManagerRecorder.java#L69-L105","documentation":"At build time CacheManagerRecorder selects a CacheManagerInfo build item that supports the configured cache type to obtain the CacheManager supplier. If no registered cache provider (Caffeine, Infinispan, Redis, etc.) claims the configured quarkus.cache.type value, a DeploymentException is thrown and the build fails.","triggerScenarios":"quarkus.cache.type set to a value no available extension supports — e.g. \"redis\" or \"infinispan\" while the corresponding extension is not on the classpath, or a plain typo in the cache type name; findSupplierForType iterates infos and finds none supporting the context.","commonSituations":"Adding the config property but forgetting the quarkus-redis-cache / quarkus-infinispan-client dependency; renaming caches across providers; copying config from a project using a different cache extension.","solutions":["Add the extension matching the configured cache type (e.g. quarkus-redis-cache for type \"redis\").","Check quarkus.cache.type spelling and the set of supported values for the extensions present.","If you don't need a specific provider, remove quarkus.cache.type to fall back to the default (Caffeine)."],"exampleFix":"<!-- before: config says redis, no provider -->\n# application.properties\nquarkus.cache.type=redis\n\n<!-- after -->\n<dependency>\n  <groupId>io.quarkus</groupId>\n  <artifactId>quarkus-redis-cache</artifactId>\n</dependency>","handlingStrategy":"validation","validationCode":"// application.properties guard: only set cache types whose extension is present\nString type = config(\"quarkus.cache.type\", \"caffeine\");\nif (type.equals(\"redis\") && !isOnClasspath(\"io.quarkus.redis.datasource.RedisDataSource\")) {\n    throw new IllegalStateException(\"quarkus.cache.type=redis requires quarkus-redis-cache dependency\");\n}\nif (type.equals(\"infinispan\") && !isOnClasspath(\"org.infinispan.manager.EmbeddedCacheManager\")) {\n    throw new IllegalStateException(\"quarkus.cache.type=infinispan requires the infinispan extension\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match every quarkus.cache.type value with its extension dependency","Verify config values against the extension's supported list before building","Run a full Maven build (not IDE-only) to catch deployment errors early"],"tags":["quarkus","cache","configuration","deployment","missing-dependency"],"backgroundTag":"unknown-cache-type","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}