github ben-manes/caffeine v3.0.0
3.0.0

latest releases: v3.1.8, v3.1.7, v3.1.6...
3 years ago

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 and AsyncCacheLoader offer bulk factory methods
  • AsyncCacheLoader 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 (was Iterable)
  • More flexible generic bounds and type parameters

Implementation improvements

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, and UnsafeAccess
  • StatsCounter.recordEviction variations
  • CacheStats constructors

Notes

  • CacheWriter usages can be replaced by Map computations and Caffeine.evictionListener
  • For best performance Unsafe may be used if available, otherwise falls back to VarHandles
  • We will continue to support and maintain version 2.x for Java 8 users

Don't miss a new caffeine release

NewReleases is sending notifications on new releases.