Releases: ben-manes/caffeine
Releases · ben-manes/caffeine
2.9.1
3.0.1
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 CacheLoaderandAsyncCacheLoaderofferbulkfactory methodsAsyncCacheLoadermethods may now throw checked exceptions- Better usage of Checker Framework nullness annotations (#337)
LoadingCache.refreshnow returns the in-flight future (#143)- Various unimplemented default methods are now abstract
- Added
LoadingCache.refreshAllconvenience method - Bulk loads now receive a
Setof 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.Unsafeis no longer required (#273)
Incompatible changes
VarExpirationtime-based puts now return the old value instead of a boolean result- Removed jandex resource as no longer utilized by Quarkus
- Split
Policy.Expirationinto fixed and refresh interfaces
Deprecation removals
CacheWriter,SingleConsumerQueue, andUnsafeAccessStatsCounter.recordEvictionvariationsCacheStatsconstructors
Notes
CacheWriterusages can be replaced byMapcomputations andCaffeine.evictionListener- For best performance
Unsafemay be used if available, otherwise falls back toVarHandles - We will continue to support and maintain version 2.x for Java 8 users
2.9.0
Cache
- Added
Caffeine.evictionListenerwhich is notified within the atomic operation when an entry is automatically removed - Added triggering cache maintenance if an iterator observes an expired entry for more aggressive eviction (#487)
- Improved eager eviction of an added or updated entry if it exceeds the cache's maximum weight
- Deprecated
CacheWriter. Please useasMapcomputations or an eviction listener instead - Added
CacheStats.of(...)to allow for becoming a value-based class in a future release
2.8.8
2.8.7
2.8.6
Cache
- Changed false sharing protection to comply with JDK 15's field layout (Java Objects Inside Out)
- Suppressed the removal listener notification when an
AsyncCachefuture value resolves to null - Improved the implementations of
AsyncCache.synchronous().asMap()conditional methods - Added Jandex index for assisting GraalVM AOT (quarkusio/quarkus#10420)
- Deprecated
UnsafeAccessandSingleConsumerQueue
JCache