quarkusio/quarkus · error · DeploymentException
Unknown cache type:
Error message
Unknown cache type:
What it means
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.
Source
Thrown at extensions/cache/runtime/src/main/java/io/quarkus/cache/runtime/CacheManagerRecorder.java:87
!cacheTypeBuildConfig.type().isEmpty()) {
cacheTypeByName.put(cacheName, cacheTypeBuildConfig.type());
} else {
// if not, use the default cache type defined "quarkus.cache.type"
cacheTypeByName.put(cacheName, cacheBuildConfig.type());
}
}
return cacheTypeByName;
}
private Supplier<CacheManager> findSupplierForType(
CacheManagerInfo.Context context,
Collection<CacheManagerInfo> infos) {
for (CacheManagerInfo info : infos) {
if (info.supports(context)) {
return info.get(context);
}
}
throw new DeploymentException("Unknown cache type: " + context.cacheType());
}
private Map<String, Supplier<CacheManager>> createCacheSupplierByCacheType(
Collection<CacheManagerInfo> infos,
List<String> cacheNames,
boolean micrometerMetricsEnabled) {
Map<String, String> cacheTypeByCacheName = mapCacheTypeByCacheName(cacheNames);
// create one context per cache type with their corresponding list of cache names
Map<String, CacheManagerInfo.Context> contextByCacheType = new HashMap<>();
for (String cacheName : cacheNames) {
contextByCacheType.computeIfAbsent(
cacheTypeByCacheName.get(cacheName),
cacheType -> this.createContextForCacheType(cacheType, micrometerMetricsEnabled))
.cacheNames()
.add(cacheName);
}View on GitHub (pinned to e1c734241f)
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).
Example fix
<!-- before: config says redis, no provider --> # application.properties quarkus.cache.type=redis <!-- after --> <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-redis-cache</artifactId> </dependency>
Defensive patterns
Strategy: validation
Validate before calling
// application.properties guard: only set cache types whose extension is present
String type = config("quarkus.cache.type", "caffeine");
if (type.equals("redis") && !isOnClasspath("io.quarkus.redis.datasource.RedisDataSource")) {
throw new IllegalStateException("quarkus.cache.type=redis requires quarkus-redis-cache dependency");
}
if (type.equals("infinispan") && !isOnClasspath("org.infinispan.manager.EmbeddedCacheManager")) {
throw new IllegalStateException("quarkus.cache.type=infinispan requires the infinispan extension");
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unable to determine the value type for '" + cacheName + "' R
- Failed to load application configuration
- Failed to initialize application configuration
- Unrecognized option for quarkus.bootstrap.misaligned-platfor
- The configuration ${clazz} is missing the @ConfigRoot annota
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/f02ec9088237b42b.
Report an issue: GitHub.