Add evictor based loadbalancer caching (#644)

* Add Evictor dependency. Implement EvictorCache.

* Add EvictorBasedLoadBalancerCacheManager. Add evictor to starter.

* Set caffeine InitialCapacity from properties.

* Add tests. Add javadocs. Fix creating multiple cache instances.

* Reformat. Change property name. Add documentation.

* Add more tests.

* Move evictor version to parent. Add more tests.

* Ignore .flattened-pom.xml.

* Encapsulate Evictor and switch to non-evictor specific class naming.

* Adjust the docs.

* Fix after code review.
This commit is contained in:
Olga Maciaszek-Sharma
2019-11-25 20:34:19 +01:00
committed by GitHub
parent 05d936803f
commit da0e06eb7a
24 changed files with 599 additions and 1393 deletions

View File

@@ -3,7 +3,6 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons-parent</artifactId>
@@ -68,6 +67,12 @@
<artifactId>caffeine</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.stoyanr</groupId>
<artifactId>evictor</artifactId>
<version>${evictor.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>