Skip to content

Commit

Permalink
Simplify evictable cache implementation
Browse files Browse the repository at this point in the history
Reusing the token-based approach of `EvictableLoadingCache` allows
implementing both evictable `Cache` (previously known as
`EvictableCache`) and evictable `LoadingCache` (`EvictableLoadingCache`)
in a concise manner. This also introducing a builder for the caches
(`EvictableCacheBuilder`), which unlocks flexibility of
`CacheBuilder` (like weighted cache entries), while still preventing
unsupported usage patterns. For example, registering `removalListener`
is not allowed, as removal listener is internally used by the cache
implementation.
  • Loading branch information
findepi committed Feb 9, 2022
1 parent 06ba92e commit 3904620
Show file tree
Hide file tree
Showing 11 changed files with 652 additions and 599 deletions.
5 changes: 5 additions & 0 deletions lib/trino-collect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
<artifactId>jsr305</artifactId>
</dependency>

<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
Loading

0 comments on commit 3904620

Please sign in to comment.