Skip to content

Commit 82b0666

Browse files
committed
Merge branch '2.7.x' into 3.0.x
Closes gh-36961
2 parents 3ae65e0 + 0e6abd1 commit 82b0666

File tree

1 file changed

+6
-3
lines changed
  • spring-boot-project/spring-boot-docs/src/docs/asciidoc/io

1 file changed

+6
-3
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/caching.adoc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ If you have not defined a bean of type `CacheManager` or a `CacheResolver` named
4848

4949
Additionally, {spring-boot-for-apache-geode}[Spring Boot for Apache Geode] provides {spring-boot-for-apache-geode-docs}#geode-caching-provider[auto-configuration for using Apache Geode as a cache provider].
5050

51-
TIP: It is also possible to _force_ a particular cache provider by setting the configprop:spring.cache.type[] property.
52-
Use this property if you need to <<io#io.caching.provider.none,disable caching altogether>> in certain environments (such as tests).
51+
TIP: If the `CacheManager` is auto-configured by Spring Boot, it is possible to _force_ a particular cache provider by setting the configprop:spring.cache.type[] property.
52+
Use this property if you need to <<io#io.caching.provider.none,use no-op caches>> in certain environments (such as tests).
5353

5454
TIP: Use the `spring-boot-starter-cache` "`Starter`" to quickly add basic caching dependencies.
5555
The starter brings in `spring-context-support`.
@@ -254,7 +254,10 @@ This is similar to the way the "real" cache providers behave if you use an undec
254254
[[io.caching.provider.none]]
255255
==== None
256256
When `@EnableCaching` is present in your configuration, a suitable cache configuration is expected as well.
257-
If you need to disable caching altogether in certain environments, force the cache type to `none` to use a no-op implementation, as shown in the following example:
257+
If you have a custom `CacheManager`, consider defining it in a separate `@Configuration` class so that you can override it if necessary.
258+
None uses a no-op implementation that is useful in tests, and slice tests use that by default via `@AutoConfigureCache`.
259+
260+
If you need to use a no-op cache rather than the auto-configured cache manager in a certain environment, set the cache type to `none`, as shown in the following example:
258261

259262
[source,yaml,indent=0,subs="verbatim",configprops,configblocks]
260263
----

0 commit comments

Comments
 (0)