Fork me on GitHub

cache2k version 0.26-BETA “Madeira Beach”

New and Noteworthy

A lot of API movement, since we work towards 1.0. See Potential breakages and API changes. The API is not stable yet.

Potential breakages

Changes in semantics or API that may break existing applications are listed here. Modifications in the statistics output will not listed as breakage.

  • Classes/interfaces: AnyBuilder, BaseAnyBuilder and RootAnyBuilder removed
  • ExceptionPropagator interface changed
  • LoadCompletionListener.loadException now expects a Throwable

Bug fixes

If something is listed here it might affect an existing application and updating is recommended.

  • EntryProcessor did not honor expiry times or policy

Fixes and Improvements

Fixes of corner cases that are most likely not affecting any existing applications and improvements are listed here.

  • ExceptionPropagator gets structured context information about exception
  • Eviction: Don’t generate ghost entries when no eviction is needed. Improves performance when cache is operated below the maximum capacity.
  • Add missing expiry event, when entry is expired immediately after an update
  • Remove build information output to standard error
  • Higher safety gap (27 seconds) for timer event, if sharp expiry is requested
  • peekEntry() and entry processor did leave a stale entry in some situations
  • MutableCacheEntry.setException() was a stub, behavior is now defined
  • Renaming of JMX properties
  • More defined behavior in some corner cases like combinations of: Immediate expiry, sharpExpriy and refreshAhead
  • Removed unused counters
  • removed prefetching ‘hack’ from getAll()
  • internal cleanups
  • EntryProcessor: MutableEntry.setException() defined

API Changes and new methods

  • Classes/interfaces: AnyBuilder, BaseAnyBuilder and RootAnyBuilder removed; Originally intended for fluent configuration sections in builders, we will do another approach.
  • Cache.getTotalEntryCount() is deprecated and will be removed in an upcoming release
  • Return values and parameters related to the cache size converted to long
  • Cleanup JMX info bean contents (unfinished)

Using this cache2k version

For Java SE/EE environments

    <dependency>
      <groupId>org.cache2k</groupId>
      <artifactId>cache2k-api</artifactId>
      <version>0.26-BETA</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.cache2k</groupId>
      <artifactId>cache2k-all</artifactId>
      <version>0.26-BETA</version>
      <scope>runtime</scope>
    </dependency>

For Android

    <dependency>
      <groupId>org.cache2k</groupId>
      <artifactId>cache2k-api</artifactId>
      <version>0.26-BETA</version>
    </dependency>
    <dependency>
      <groupId>org.cache2k</groupId>
      <artifactId>cache2k-core</artifactId>
      <version>0.26-BETA</version>
      <scope>runtime</scope>
    </dependency>

Using the JCache / JSR107 provider

    <dependency>
      <groupId>org.cache2k</groupId>
      <artifactId>cache2k-jcache</artifactId>
      <version>0.26-BETA</version>
    </dependency>
    <dependency>
      <groupId>javax.cache</groupId>
      <artifactId>cache-api</artifactId>
      <version>1.0.0</version>
    </dependency>