caffeine cache for loadbalancer Fix gh 638 (#643)

* Add Caffeine-based loadBalancerCacheManager.

* Add more tests.

* Fix test.

* Only enable loadBalancer caching if caffeine is on classpath. Warn if
caffeine is not on classpath.

* Add javadocs.

* Add docs. Change property name.

* Fix configuration.

* Fix after code review. Add another constructor to CaffeineBasedLoadBalancerCacheManager,
allowing to pass cache name, in order to support alternative ServiceInstanceListSupplierImplementations.
This commit is contained in:
Olga Maciaszek-Sharma
2019-11-22 15:53:57 +01:00
committed by GitHub
parent d4cc825aa0
commit bf6b31ee8a
8 changed files with 334 additions and 57 deletions

View File

@@ -61,7 +61,12 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -78,10 +83,5 @@
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>