Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify evictable cache implementation
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