3.0.0
This release includes API incompatible changes.
Highlights
- Java 11 or above is required
- Java 8 users can continue to use version 2.x, which will be supported
API improvements
- Added
Policy.refreshes()
for a snapshot of the in-flight refresh operations CacheLoader
andAsyncCacheLoader
offerbulk
factory methodsAsyncCacheLoader
methods may now throw checked exceptions- Better usage of Checker Framework nullness annotations (#337)
LoadingCache.refresh
now returns the in-flight future (#143)- Various unimplemented default methods are now abstract
- Added
LoadingCache.refreshAll
convenience method - Bulk loads now receive a
Set
of keys (wasIterable
) - More flexible generic bounds and type parameters
Implementation improvements
- Refresh operations ignore redundant calls during an in-flight load and are linearizable (#193, #236, #282, #322, #373, #467)
- The Java Platform Logging API is used instead of
java.util.logging
(#456) sun.misc.Unsafe
is no longer required (#273)
Incompatible changes
VarExpiration
time-based puts now return the old value instead of a boolean result- Removed jandex resource as no longer utilized by Quarkus
- Split
Policy.Expiration
into fixed and refresh interfaces
Deprecation removals
CacheWriter
,SingleConsumerQueue
, andUnsafeAccess
StatsCounter.recordEviction
variationsCacheStats
constructors
Notes
CacheWriter
usages can be replaced byMap
computations andCaffeine.evictionListener
- For best performance
Unsafe
may be used if available, otherwise falls back toVarHandles
- We will continue to support and maintain version 2.x for Java 8 users