Skip to content

Releases: ben-manes/caffeine

3.0.5

03 Dec 04:56
Compare
Choose a tag to compare

Cache

  • Fixed reference eviction when used with a broken executor (JDK-8274349)
  • Suppressed log warnings if a future is cancelled or times out (#597)
  • Removed @Nullable from LoadingCache.get(key) (#594)
  • Fixed early expiration of in-flight async loads (#625)

JCache

  • close() will now shutdown the executor and wait for in-flight loads to finish

2.9.3

03 Dec 04:39
Compare
Choose a tag to compare

Cache

  • Fixed reference eviction when used with a broken executor (JDK-8274349)
  • Reduced the entry overhead by 8 bytes when using weak or soft values
  • Suppressed log warnings if a future is cancelled or times out (#597)
  • Fixed Map.entrySet.contains(o) to use reference equality
  • Fixed early expiration of in-flight async loads (#625)

JCache

  • close() will now shutdown the executor and wait for in-flight loads to finish

3.0.4

13 Sep 04:40
Compare
Choose a tag to compare

Cache

  • Fixed cases that incorrectly notified the removal listener for no-op replacements (#593)
  • Improved how refreshAfterWrite is triggered on a read to avoid hotspots
  • Added the ability to capture coldest & hottest weighted snapshots
  • Reduced the per-entry overhead when using weak/soft values
  • Fixed Map.entrySet.contains(o) to use reference equality

3.0.3

02 Jul 04:23
Compare
Choose a tag to compare

Cache

  • Fixed reading an intermittent null weak/soft value during a concurrent write (#568)
  • Fixed extraneous eviction when concurrently removing a collected entry after a writer resurrects it with a new mapping (#568)
  • Fixed excessive retries of discarding an expired entry when the fixed duration period is extended, thereby resurrecting it (#568)

2.9.2

02 Jul 04:22
Compare
Choose a tag to compare

Cache

  • Fixed reading an intermittent null weak/soft value during a concurrent write (#568)
  • Fixed extraneous eviction when concurrently removing a collected entry after a writer resurrects it with a new mapping (#568)
  • Fixed excessive retries of discarding an expired entry when the fixed duration period is extended, thereby resurrecting it (#568)

3.0.2

03 May 02:40
Compare
Choose a tag to compare

Cache

  • Added cancellation of the next scheduled expiration cleanup when the cache becomes empty (#542)
  • Improved how variable expiration reorganizes the timer events (#541)
  • Improved usage of nullness annotations (#530)
  • Removed sun.misc.Unsafe and fallbacks
  • Added module descriptors (#535)

2.9.1

03 May 02:33
Compare
Choose a tag to compare

Cache

  • Added cancellation of the next scheduled expiration cleanup when the cache becomes empty (#542)
  • Improved how variable expiration reorganizes the timer events (#541)
  • Added putIfAbsent optimistic fastpath (#506)

3.0.1

18 Mar 03:28
Compare
Choose a tag to compare
  • Fixed thread local fallback initialization for striped buffer (#515)
  • Improved eviction reordering for weighted caches (#513)
  • Added putIfAbsent optimistic fastpath (#506)

3.0.0

21 Feb 21:39
Compare
Choose a tag to compare

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

2.9.0

16 Feb 05:15
Compare
Choose a tag to compare

Cache

  • Added Caffeine.evictionListener which 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 use asMap computations or an eviction listener instead
  • Added CacheStats.of(...) to allow for becoming a value-based class in a future release