Document default metadata cache expiration policy

Closes gh-1391
This commit is contained in:
Stephane Nicoll 2023-04-19 13:30:39 +02:00
parent 447e9e438e
commit fd76c7d0a3

View File

@ -1155,8 +1155,12 @@ automatically:
If you use the service, you'll notice that the logs have lots of entries with the message If you use the service, you'll notice that the logs have lots of entries with the message
`Fetching boot metadata from https://api.spring.io/projects/spring-boot/releases`. To avoid `Fetching boot metadata from https://api.spring.io/projects/spring-boot/releases`. To avoid
checking for the latest Spring Boot versions too often, you should enable caching on your checking for the latest Spring Boot versions too often, you should enable caching on your
service. Spring Initializr has some auto-configuration to apply the proper caches if you service.
are willing to use a JCache (JSR-107) implementation.
Spring Initializr has an auto-configuration for the requested caches if you are willing to
use a JCache (JSR-107) implementation. By default, the service metadata cache is
configured with an expiration policy that allows entries to remain in the cache for 10
minutes.
NOTE: The caches are created with an auto-configured `JCacheManagerCustomizer` with order `0` and only if they don't exist already. NOTE: The caches are created with an auto-configured `JCacheManagerCustomizer` with order `0` and only if they don't exist already.
You can contribute a bean of the same type with a lower `@Order` to override some of the configuration to suit your specific needs. You can contribute a bean of the same type with a lower `@Order` to override some of the configuration to suit your specific needs.