From d05e79215796527e638cea6b8fe18d9056e6e37f Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Fri, 18 Nov 2022 14:30:46 +0100 Subject: [PATCH] Clarify spring.cache.type=hazelcast in the documentation Closes gh-33245 --- .../src/docs/asciidoc/io/caching.adoc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/caching.adoc b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/caching.adoc index 40c1ab039a54..9dd6d2d83d0e 100644 --- a/spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/caching.adoc +++ b/spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/caching.adoc @@ -128,17 +128,20 @@ An alternate configuration file can be provided as well, as shown in the followi config: "classpath:config/another-config.xml" ---- - - [[io.caching.provider.hazelcast]] ==== Hazelcast -Spring Boot has <>. -If a `HazelcastInstance` has been auto-configured, it is automatically wrapped in a `CacheManager`. +Spring Boot has <>. +If a `HazelcastInstance` has been auto-configured and `com.hazelcast:hazelcast-spring` is on the classpath, it is automatically wrapped in a `CacheManager`. +NOTE: Hazelcast can be used as a JCache compliant cache or as a Spring `CacheManager` compliant cache. +When setting configprop:spring.cache.type[] to `hazelcast`, Spring Boot will use the `CacheManager` based implementation. +If you want to use Hazelcast as a JCache compliant cache, set configprop:spring.cache.type[] to `jcache`. +If you have multiple JCache compliant cache providers and want to force the use of Hazelcast, you have to <>. [[io.caching.provider.infinispan]] ==== Infinispan + https://infinispan.org/[Infinispan] has no default configuration file location, so it must be specified explicitly. Otherwise, the default bootstrap is used.