<tdclass="tableblock halign-left valign-top"><pclass="tableblock">Time To Live - time counted from writing of the record, after which cache entries are expired, expressed as a {@link Duration}. The property {@link String} has to be in keeping with the appropriate syntax as specified in Spring Boot <code>StringToDurationConverter</code>. @see <a href= "https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/StringToDurationConverter.java">StringToDurationConverter.java</a></p></td>
</tr>
<tr>
@ -286,7 +286,7 @@ Also, you can define your own properties.
@@ -286,7 +286,7 @@ Also, you can define your own properties.
@ -1499,7 +1499,7 @@ as the value of the <code>spring.cloud.loadbalancer.cache.ttl</code> property.
@@ -1499,7 +1499,7 @@ as the value of the <code>spring.cloud.loadbalancer.cache.ttl</code> property.
You can also set your own LoadBalancer cache initial capacity by setting the value of the <code>spring.cloud.loadbalancer.cache.capacity</code> property.</p>
</div>
<divclass="paragraph">
<p>The default setup includes <code>ttl</code> set to 30 seconds and the default <code>initialCapacity</code> is <code>256</code>.</p>
<p>The default setup includes <code>ttl</code> set to 35 seconds and the default <code>initialCapacity</code> is <code>256</code>.</p>
</div>
<divclass="paragraph">
<p>You can also altogether disable loadBalancer caching by setting the value of <code>spring.cloud.loadbalancer.cache.enabled</code>
@ -1631,7 +1631,7 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
@@ -1631,7 +1631,7 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
<divclass="paragraph">
<p>You could use this sample configuration to set it up:</p>
<preclass="highlightjs highlight"><codeclass="language-java hljs"data-lang="java">public class CustomLoadBalancerConfiguration {
@ -1641,7 +1641,6 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
@@ -1641,7 +1641,6 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
return ServiceInstanceListSupplier.builder()
.withDiscoveryClient()
.withHealthChecks()
.withCaching()
.build(context);
}
}</code></pre>
@ -1649,6 +1648,10 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
@@ -1649,6 +1648,10 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">NOTE</dt>
<dd>
<p><code>HealthCheckServiceInstanceListSupplier</code> has its own caching mechanism based on Reactor Flux <code>replay()</code>, therefore, if it’s being used, you may want to skip wrapping that supplier with <code>CachingServiceInstanceListSupplier</code>.</p>
</dd>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>In order to make working on your own LoadBalancer configuration easier, we have added a <code>builder()</code> method to the <code>ServiceInstanceListSupplier</code> class.</p>
@ -1499,7 +1499,7 @@ as the value of the <code>spring.cloud.loadbalancer.cache.ttl</code> property.
@@ -1499,7 +1499,7 @@ as the value of the <code>spring.cloud.loadbalancer.cache.ttl</code> property.
You can also set your own LoadBalancer cache initial capacity by setting the value of the <code>spring.cloud.loadbalancer.cache.capacity</code> property.</p>
</div>
<divclass="paragraph">
<p>The default setup includes <code>ttl</code> set to 30 seconds and the default <code>initialCapacity</code> is <code>256</code>.</p>
<p>The default setup includes <code>ttl</code> set to 35 seconds and the default <code>initialCapacity</code> is <code>256</code>.</p>
</div>
<divclass="paragraph">
<p>You can also altogether disable loadBalancer caching by setting the value of <code>spring.cloud.loadbalancer.cache.enabled</code>
@ -1631,7 +1631,7 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
@@ -1631,7 +1631,7 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
<divclass="paragraph">
<p>You could use this sample configuration to set it up:</p>
<preclass="highlightjs highlight"><codeclass="language-java hljs"data-lang="java">public class CustomLoadBalancerConfiguration {
@ -1641,7 +1641,6 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
@@ -1641,7 +1641,6 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
return ServiceInstanceListSupplier.builder()
.withDiscoveryClient()
.withHealthChecks()
.withCaching()
.build(context);
}
}</code></pre>
@ -1649,6 +1648,10 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
@@ -1649,6 +1648,10 @@ We suggest passing a <code>DiscoveryClientServiceInstanceListSupplier</code> del
</div>
<divclass="dlist">
<dl>
<dtclass="hdlist1">NOTE</dt>
<dd>
<p><code>HealthCheckServiceInstanceListSupplier</code> has its own caching mechanism based on Reactor Flux <code>replay()</code>, therefore, if it’s being used, you may want to skip wrapping that supplier with <code>CachingServiceInstanceListSupplier</code>.</p>
</dd>
<dtclass="hdlist1">TIP</dt>
<dd>
<p>In order to make working on your own LoadBalancer configuration easier, we have added a <code>builder()</code> method to the <code>ServiceInstanceListSupplier</code> class.</p>