All Versions
27
Latest Version
Avg Release Cycle
24 days
Latest Release
911 days ago

Changelog History
Page 1

  • v1.9.5.Beta Changes

    December 11, 2020

    ๐Ÿš€ This is a preview release for evaluation purposes and should not be used in production.

    The preview is in preparation for version 2 which will have some major breaking
    changes to the previous releases. The final release will be 2.0.0.Final - "North Atlantic".

    ๐Ÿ†• New and Noteworthy

    • ๐Ÿ“š Documentation fixes. This is the release candidate 2 of cache2k version 2.0

    API Changes Possible Breakages

    • ๐Ÿ“ฆ Move Weigher to package org.cache2k.operation.

    ๐Ÿ›  Fixes and Improvements

    • ๐Ÿ›  Fix site build for Java 11
    • ๐Ÿ“š Documentation touch ups
    • ๐Ÿ”„ Change configuration XML schema to version 2 and archive version 1
    • Event listeners will be send the wrapped cache
  • v1.9.4.Beta Changes

    December 07, 2020

    ๐Ÿš€ This is a preview release for evaluation purposes and should not be used in production.

    The preview is in preparation for version 2 which will have some major breaking
    changes to the previous releases. The final release will be 2.0.0.Final - "North Atlantic".

    ๐Ÿ†• New and Noteworthy

    • ๐Ÿš€ Last set of API changes. This is the release candidate 1 of cache2k version 2.0

    Possible Breakages

    • N/A

    API Changes Possible Breakages

    • Customizations can implement AutoCloseable, changed from Closeable, Java 8 improvement
    • Cache and CacheManager implements AutoCloseable, changed from Closeable, Java 8 improvement
    • โฑ Scheduler and TimeReference available in base configuration and API

    ๐Ÿ›  Fixes and Improvements

    • Common timer threads are destroyed when last cache is closed, []GH#167](#167),
      Thanks Jingxiao Gu / @dawnwords for reporting!
    • 0๏ธโƒฃ Corner case: Don't drop a altered default name after all cache managers are closed
  • v1.9.3.Alpha Changes

    November 28, 2020

    ๐Ÿš€ This is a preview release for evaluation purposes and should not be used in production.

    The preview is in preparation for version 2 which will have some major breaking changes to the previous releases. The final release will be 2.0.0.Final - "North Atlantic".

    ๐Ÿ†• New and Noteworthy

    • โšก๏ธ Update to enhance compatibility of client code between version 1.6 with 2.0 of cache2k

    API Changes / Possible Breakages

    • ๐Ÿ—„ Within alpha: Un deprecate KeyValueSource, that's simple and useful
    • โฌ‡๏ธ Drop ExpiryTimeValues.NO_CACHE. ExpiryTimeValues.NOW which has a value of 0 means no caching, and does not start a refresh. Introduced ExpiryTimeValues.REFRESH again, sinc logically everything between 0 (exclusive) and the current time, expires and starts a refresh, if refresh ahead is enabled.
    • Within alpha: Reverse hierarchy for new CacheLoaderException, which enhanced compatibility with code doing an instanceof

    ๐Ÿ›  Fixes and Improvements

    • Cap suppression or caching of exceptions determined by ResiliencePolicy to the expireAfterWrite duration, if specified
  • v1.9.2.Alpha Changes

    November 23, 2020

    ๐Ÿš€ This is a preview release for evaluation purposes and should not be used in production.

    The preview is in preparation for version 2 which will have some major breaking
    changes to the previous releases. The final release will be 2.0.0.Final - "North Atlantic".

    ๐Ÿ†• New and Noteworthy

    • @nullable annotations
    • ๐Ÿ‘ General scheme to enable extra functionality, used for JMX and Micrometer support
    • 0๏ธโƒฃ No caching of exceptions by default. This has to be enabled explicitly by specifying
      0๏ธโƒฃ ResiliencePolicy. Previous default resilience available as UniversalResiliencePolicy in
      cache2k-addon

    Possible Breakages

    ๐Ÿš€ Since this is a major release, some rarely used things in the API are
    ๐Ÿ”„ changed without backwards compatibility. Most code is supposed to run
    without breaking.

    • ๐Ÿšš Cache.getStatistics removed. Replaced by CacheManagement.of(Cache).sampleStatistics().
    • ๐Ÿšš Cache.clearAndClose removed. Replaced by CacheManagement.destroy
    • โœ‚ Removed deprecated MutableCacheEntry.getCurrentTime, replaced with getStartTime
    • โœ‚ Remove MutableCacheEntry.wasExisting and MutableCacheEntry.getOldValue
    • ๐Ÿ“‡ Rename MutableCacheEntry.getRefreshedTime to getModificationTime
    • MutableCacheEntry.exists: Does not change the value after setValue or triggered load
    • MutableCacheEntry.getValue: Does not change the value after setValue
    • ๐Ÿ”ง Every class with Configuration shortened to Config and consequently changed the
      ๐Ÿ”ง package name org.cache2k.configuration to org.cache2k.config.
    • Cache2kBuilder.toConfiguration() renamed to config()
    • ๐Ÿ”ง Lots restructuring around the extra configuration sections and customizations
    • โœ‚ remove Cache2kBuilder.enableJmx. Replaced with Cache2kBuilder.enable(JmxSupport.class)
    • ๐Ÿ‘ Cache.requestInterface throws UnsupportedOperationException if the requested interface
      ๐Ÿ‘ is not supported instead of null
    • ๐Ÿ”„ Change in special expiry values semantics: Remove ExpiryTimeValues.REFRESH.
      ExpiryTimeValues.NOW expires and starts a refresh if refresh ahead is enabled.
      ExpiryTimeValues.NO_CACHE expires and starts no refresh.
    • 0๏ธโƒฃ No caching of exceptions by default. This has to be enabled explicitly by specifying
      0๏ธโƒฃ ResiliencePolicy. Previous default resilience available as UniversalResiliencePolicy in
      cache2k-addon

    API Changes

    • ๐Ÿ“‡ Renamed ExceptionInformation to LoadExceptionInfo
    • ๐Ÿ†• New method CacheEntry.getExceptionInfo()
    • ๐Ÿšš org.cache2k.jmx, API for JMX MXBeans removed
    • ๐Ÿ†• New interfaces CacheManagement, CacheControl and CacheInfo in org.cache2k.management
    • ๐Ÿ†• New method: MutableCacheEntry.lock
    • ๐Ÿ“‡ Rename MutableCacheEntry.reload to MutableCacheEntry.load
    • โœ‚ Remove TimeReference interface from public API and make that local to cache2k-core
    • ๐Ÿ†• New method: MutableCacheEntry.getExpiryTime()
    • โœ‚ Remove Cache2kBuilder.enableJmx
    • Cache2kBuilder: New methods `set
    • ๐Ÿ†• New methods: Cache.mutate, Cache.mutateAll

    ๐Ÿ›  Fixes and Improvements

    • ๐Ÿ‘ป Cache.loadAll() and Cache.reloadAll() complete with exception if a a loader
      ๐Ÿ‘ป exception happened. If more than one exception happened the one is propagated.
    • ๐Ÿ‘Œ Improved interface of ExceptionPropagator and LoadExceptionInfo,
      ๐Ÿ‘ป A CacheEntry may be cast to LoadExceptionInfo if an exception is present
    • Cache.invoke, EntryProcessor: Make expiry calculations and listeners calls more consistent
      if expiry event races with the start of the operation
    • ๐Ÿ”’ MutableCacheEntry.lock allows to lock an entry for mutation explicitly
    • Cache.asMap / ConcurrentMap implementation implements compute methods
      and runs them only once
    • ๐Ÿ— Introduced ConfigAugmenter which can make changed to the configuration before a cache is build
    • ๐Ÿ”ง Cache2kBuilder: Methods setup, apply allow to execute a function on the configuration
      ๐Ÿ— or builder, which can be used to factor out configuration fragments.
      We use this to provide enable and disable methods on policies.
    • ๐Ÿ‘ป AdvancedCacheLoader, AsyncCacheLoader and ExpiryPolicy get null if current entry carries exception, #163
    • โœ‚ Remove ServiceLoader from JMX support in cache2k-jmx, cache2k-micrometer
    • Introduce concept of CacheFeature and ToggleCacheFeature
    • ๐Ÿšš CacheType: immutable instead of bean. CacheType.of moved from CacheTypeCapture
    • โœ‚ Remove the need of serializable from the configuration objects, by doing a deep
      ๐Ÿ”ง copy of the default configuration via bean setters and getters.
    • Cache2kConfig: Make setEternal a separate flag.
      โœ‚ Remove logic from setters, so we can use setters and getter to copy the
      object
    • Cache.mutate, Cache.mutateAll for a mutation only entry processor variant
    • @Nullable, @NonNull annotations
    • Within alpha: change new ExceptionPropagator from <K> to <K, V>, dito at LoadExceptionInfo
    • @nullness annotations
    • Lots of typing refinements
    • Cache.entries and Cache.keys return a Set
    • Cache.computeIfAbsent with function
    • Ignore entryCapacity setting in case a weigher is specified
    • ๐Ÿ‘ Allow listeners to throw a checked exception
  • v1.9.1.Alpha Changes

    October 13, 2020

    ๐Ÿš€ This is a preview release for evaluation purposes and should not be used in production.

    The preview is in preparation for version 2 which will have some major breaking changes to the previous releases. The final release will be 2.0.0.Final - "North Atlantic".

    ๐Ÿ†• New and Noteworthy

    • cache2k-api, cache2k-core, cache2k-jmx and cache2k-config are fully modularized
    • Requires at least Java 8 to run
    • ๐Ÿ”ง Adaptions to Java 8 on API level. E.g. use of Duration in the configuration
    • ๐Ÿ†• New interfaces for CacheLoader and CacheWriter
    • ๐Ÿ—„ Removal of deprecated classes and methods
    • ๐Ÿ”ง JMX and XML configuration support is no longer part of cache2k-core
    • ๐Ÿ‘€ OSGi support with cache2k-osgi-all removed, see: #83

    Possible Breakages

    ๐Ÿš€ Since this is a major release, some rarely used things in the API are changed without backwards compatibility. Most code is supposed to run without breaking.

    • Requires at least Java 8 to run
    • โœ‚ Remove deprecated classes and methods: Cache.prefetch, Cache.prefetchAll, IntCache, LongCache,
      CacheEntry.getLastModification, AbstractCacheEntry
    • Incompatible change of CustomizationSupplier interface
    • ๐Ÿšš org.cache2k.integration.ResiliencePolicy removed. Replaced by: org.cache2k.io.ResiliencePolicy
    • ๐Ÿšš JMX support moved from cache2k-core to cache2k-jmx to minimize module dependencies
    • ๐Ÿ”ง XML configuration moved from cache2k-core to cache2k-config to minimize module dependencies
    • โฌ‡๏ธ Dropped apache commons logging support. Commons logging seems to be not
      ๐Ÿ‘ maintained any more and lacks Jigsaw/module support.
    • โฌ‡๏ธ Drop support for XML configuration on Android, removed XML pull dependency
      ๐Ÿ‘ (The Android will be potentially unsupported in cache2k V2 at first)
    • ๐Ÿ”ง Moved JCache configuration classes in org.cache.jcache from cache2k-api to cache2k-jcache.
      If these are used, cache2k-jcache needs to be in compile scope.
    • Cache2kConfiguration: Changed all parameters of type long, representing
      milliseconds to type Duration

    API Changes

    • ๐Ÿ“ฆ org.cache2k.integration.CacheLoader and everything in package org.cache2k.integration
      ๐Ÿ—„ is deprecated. Replacements are available in org.cache2k.io. This major change was done to
      ๐Ÿ”„ change from abstract classes to interface. The new package was introduced for smoother transition
      ๐Ÿ—„ to keep the previous classes and deprecated them.
    • โž• Add Cache.loadAll and Cache.reloadAll which return CompletableFuture
      ๐Ÿ—„ Old methods which use CacheOperationCompletionListener are deprecated
    • โœ‚ Remove deprecated classes and methods: Cache.prefetch, Cache.prefetchAll, IntCache, LongCache,
      CacheEntry.getLastModification, AbstractCacheEntry

    ๐Ÿ›  Fixes and Improvements

    • All cache customizations (e.g. CacheLoader) implement Customization.
    • ๐Ÿšš Speedup of internal hash table, because compatibility for Java 6 could be removed
  • v1.6.0.Final Changes

    October 08, 2020

    ๐ŸŽ cache2k is a high performance and light weight in-process caching library. Compared to other libraries
    (EHCache, Guava and Caffeine) it achieves the highest throughput for cache hits while still providing
    one of the best eviction efficiency. Advanced features of cache2k, like refresh ahead and resilience
    can solve typical application problems with ease.

    ๐ŸŒฒ This change log lists the complete changes since the last stable version 1.4.1.Final.

    ๐Ÿ†• New and Noteworthy

    • ๐Ÿ†• New timer based on hierarchical timer wheels, which is more performance and
      scales linear with more cache entries
    • No more extra thread per cache, in cache timer is used, e.g. for expiry

    Potential breakages

    • 0๏ธโƒฃ No separate executor for async listeners by default any more.
      If an async listener executor is not specified it uses the executor
      0๏ธโƒฃ defined by Cache2kBuilder.executor which in turn defaults to the
      common ForkJoinPool in Java 8.
    • Slightly more lag for operations triggered by time, e.g. cache
      cleanup after expiry, calls of expiry listeners, refreshing.
      The lag can be controlled by Cache2kBuilder.timerLag

    API Changes

    • ๐Ÿ—„ Deprecated ExpiryTimeValues.NO_CACHE
    • ๐Ÿ—„ Deprecated Cache2kBuilder.prefetchExecutor, introduced Cache2kBuilder.refreshExecutor (rename)
    • ๐Ÿ—„ Deprecated Cache.prefetch and Cache.prefetchAll

    ๐Ÿ›  Fixes and Improvements

    • โœ‚ Remove hash quality metric
    • MutableCacheEntry.reload() does load the entry even if already cached
    • ๐Ÿ‘€ After recovering from a load exception the expiry policy did not see the
      ๐Ÿ‘ป correct previous entry value with the exception
    • ๐Ÿ‘Œ Improved internal structure and test coverage

    Using this cache2k version

    The binaries are available on maven central.

    For Java SE/EE and Android environments

    For Maven users:

        <dependency>
          <groupId>org.cache2k</groupId>
          <artifactId>cache2k-base-pom</artifactId>
          <version>1.6.0.Final</version>
          <type>pom</type>
        </dependency>
    

    Recommended for Gradle users:

    def cache2kVersion = '1.6.0.Final'
    
    dependencies {
        implementation "org.cache2k:cache2k-api:${cache2kVersion}"
        runtimeOnly "org.cache2k:cache2k-core:${cache2kVersion}"
    }
    

    Note to Android users: The included jar files contain code that might only be needed in server environments (e.g. JMX support).
    โœ… It is possible to strip unnecessary code. Example ProGuard rules can be found at Andriod - cache2k User Guide

    Using the JCache / JSR107 provider

    Maven users include the cache2k JCache provider this way:

        <dependency>
          <groupId>org.cache2k</groupId>
          <artifactId>cache2k-jcache</artifactId>
          <version>1.6.0.Final</version>
          <scope>runtime</scope>
        </dependency>
    

    For Gradle users:

    dependencies {
        runtimeOnly "org.cache2k:cache2k-jcache:1.6.0.Final"
    }
    

    ๐Ÿ”ง Implementation details, tuning tips and hints on configuration can be found at: [JCache - cache2k User Guide](https://cache2k.org/docs/latest/user-guide.html#jcache

  • v1.5.2.Beta Changes

    October 08, 2020

    ๐Ÿš€ This is a preview release for evaluation purposes and should not be used in production.
    The final release is planed as "Gulf of Thailand 1.6.0.Final".

    ๐Ÿ†• New and Noteworthy

    • N/A

    Possible Breakages

    • N/A

    API Changes

    • ๐Ÿ—„ Deprecated Cache.prefetch and Cache.prefetchAll

    ๐Ÿ›  Fixes and Improvements

    • ๐Ÿ‘€ After recovering from a load exception the expiry policy did not see the
      ๐Ÿ‘ป correct previous entry value with the exception
    • ๐Ÿ‘Œ Improved internal structure and test coverage
  • v1.5.1.Alpha Changes

    October 04, 2020

    ๐Ÿš€ This is a preview release for evaluation purposes and should not be used in production.
    The final release is planed as "Gulf of Thailand 1.6.0.Final".

    ๐Ÿ†• New and Noteworthy

    • ๐Ÿ†• New timer based on hierarchical timer wheels, which is more performance and
      scales linear with more cache entries
    • No more extra thread per cache, in cache timer is used, e.g. for expiry

    Possible Breakages

    • 0๏ธโƒฃ No separate executor for async listeners by default any more.
      If an async listener executor is not specified it uses the executor
      0๏ธโƒฃ defined by Cache2kBuilder.executor which in turn defaults to the
      common ForkJoinPool in Java 8.
    • Slightly more lag for operations triggered by time, e.g. cache
      cleanup after expiry, calls of expiry listeners, refreshing.
      The lag can be controlled by Cache2kBuilder.timerLag

    API Changes

    • ๐Ÿ—„ Deprecated ExpiryTimeValues.NO_CACHE
    • ๐Ÿ—„ Deprecated Cache2kBuilder.prefetchExecutor, introduced Cache2kBuilder.refreshExecutor (rename)

    ๐Ÿ›  Fixes and Improvements

    • โœ‚ Remove hash quality metric
    • MutableCacheEntry.reload() does load the entry even if already cached
  • v1.4.1.Final Changes

    October 02, 2020

    ๐ŸŽ cache2k is a high performance and light weight in-process caching library. Compared to other libraries
    (EHCache, Guava and Caffeine) it achieves the highest throughput for cache hits while still providing
    one of the best eviction efficiency. Advanced features of cache2k, like refresh ahead and resilience
    can solve typical application problems with ease.

    ๐Ÿš‘ Critical bug fix for 1.4.0.Final.

    ๐Ÿ›  Fixes

    • Race under special conditions in Cache.computeIfAbsent, Cache.peekAndPut, Cache.get with loader.
      ๐Ÿ‘€ See: #155

    Using this cache2k version

    The binaries are available on maven central.

    For Java SE/EE and Android environments

    For Maven users:

        <dependency>
          <groupId>org.cache2k</groupId>
          <artifactId>cache2k-base-pom</artifactId>
          <version>1.4.1.Final</version>
          <type>pom</type>
        </dependency>
    

    Recommended for Gradle users:

    def cache2kVersion = '1.4.1.Final'
    
    dependencies {
        implementation "org.cache2k:cache2k-api:${cache2kVersion}"
        runtimeOnly "org.cache2k:cache2k-core:${cache2kVersion}"
    }
    

    Note to Android users: The included jar files contain code that might only be needed in server environments (e.g. JMX support).
    โœ… It is possible to strip unnecessary code. Example ProGuard rules can be found at Andriod - cache2k User Guide

    Using the JCache / JSR107 provider

    Maven users include the cache2k JCache provider this way:

        <dependency>
          <groupId>org.cache2k</groupId>
          <artifactId>cache2k-jcache</artifactId>
          <version>1.4.1.Final</version>
          <scope>runtime</scope>
        </dependency>
    

    For Gradle users:

    dependencies {
        runtimeOnly "org.cache2k:cache2k-jcache:1.4.1.Final"
    }
    

    ๐Ÿ”ง Implementation details, tuning tips and hints on configuration can be found at: JCache - cache2k User Guide

  • v1.4.0.Final Changes

    September 12, 2020

    ๐ŸŽ cache2k is a high performance and light weight in-process caching library. Compared to other libraries
    (EHCache, Guava and Caffeine) it achieves the highest throughput for cache hits while still providing
    one of the best eviction efficiency. Advanced features of cache2k, like refresh ahead and resilience
    can solve typical application problems with ease.

    Highlights of the new version:

    ๐ŸŒฒ This change log lists the complete changes since the last stable version 1.2.4.Final.

    ๐Ÿ†• New and Noteworthy

    • Weigher
    • AsyncCacheLoader
    • Eviction listener and eviction improvements
    • ๐Ÿ”€ Synchronous execution of expiry listener
    • ๐Ÿ‘ Micrometer support
    • Online resize of caches
    • ๐Ÿ‘Œ Support for GraalVM native image build

    API Changes

    ๐Ÿ†• New methods / fields:

    • 0๏ธโƒฃ CacheManager.STANDARD_DEFAULT_MANAGER_NAME
    • CacheInfoMXBean.isWeigherPresent()
    • CacheInfoMXBean.isLoaderPresent()
    • CacheInfoMXBean.getTotalWeight()
    • CacheInfoMXBean.getMaximumWeight()
    • CacheInfoMXBean.getCapacityLimit()
    • Cache.getStatistics()

    ๐Ÿ†• New interface:

    • AsyncCacheLoader

    ๐Ÿ—„ Deprecation:

    • IntCache, LongCache
    • ๐Ÿ— Cache2kBuilder.buildIntCache(), Cache2kBuilder.buildLongCache()

    API Changes and Potential breakages

    ๐Ÿ”€ Cache2kBuilder.addListener will execute an EntryExpiredLister synchronously. In version
    1.2 an expiry listener was always executed asynchronously. This is an potentially incompatible
    ๐Ÿ”„ change, in case expiry listeners are used. Review the existing client code and
    ๐Ÿ‘‰ make sure that addAsyncListeners is used for an EntryExpiredLister if that is wanted.

    ๐Ÿ›  Fixes

    • ๐Ÿ›  Fix CacheManager.setDefaultName, see GH#108
    • ๐Ÿšš race of refresh and delete: if an entry is deleted via Cache.remove it was not
      reappearing when refreshed concurrently
    • ๐Ÿ›  fix missing expiry listener call after a created listener call, in case expiry during the insert
    • expiry, expireAfterWrite, refreshAhead: Fix race condition of a Cache.put and the

    ๐Ÿ‘Œ Improvements

    • โœ‚ Remove randomized hash seed and simplify the "rehashing" of hash codes identical to Java
      HashMap and ConcurrentHashMap
    • Async Cacheloader GH#93
    • CacheEntryEvictionListener added, GH#59
    • ๐Ÿ”ฆ Expose cache statistics via Cache.getStatistics()
    • ๐Ÿ‘€ Eviction: Efficiency improvements, see comment: #101 (comment)
    • ๐Ÿ”€ Expiry listener supports synchronous operation
    • ๐Ÿ—„ Deprecated IntCache and LongCache
    • Internal: Improvement and simplification of ExceptionPropagator handling
      termination of the probation period after a refresh.
    • Cache.invoke / EntryProcessor: Internal improvements when using listeners: avoid unnecessary
      entry reads
    • internal cleanup: use common code for refresh in different cache variants
    • eviction efficiency fix for a few special short traces
    • ๐Ÿ‘Œ Support for new cache methods from Spring Framework 5.2
    • doc clarifications and improvements
    • 0๏ธโƒฃ SpringCache2kCacheManager.setAllowUnknownCache is true by default, to minimize initial setup
    • ๐Ÿ–จ CacheEntry.toString output does not call toString on the value and print hashCode instead
    • doc clarifications
    • ๐Ÿ’… Code style improvements

    Using this cache2k version

    The binaries are available on maven central.

    For Java SE/EE and Android environments

    For Maven users:

        <dependency>
          <groupId>org.cache2k</groupId>
          <artifactId>cache2k-base-pom</artifactId>
          <version>1.4.0.Final</version>
          <type>pom</type>
        </dependency>
    

    Recommended for Gradle users:

    def cache2kVersion = '1.4.0.Final'
    
    dependencies {
        implementation "org.cache2k:cache2k-api:${cache2kVersion}"
        runtimeOnly "org.cache2k:cache2k-core:${cache2kVersion}"
    }
    

    Note to Android users: The included jar files contain code that might only be needed in server environments (e.g. JMX support).
    โœ… It is possible to strip unnecessary code. Example ProGuard rules can be found at Andriod - cache2k User Guide

    Using the JCache / JSR107 provider

    Maven users include the cache2k JCache provider this way:

        <dependency>
          <groupId>org.cache2k</groupId>
          <artifactId>cache2k-jcache</artifactId>
          <version>1.4.0.Final</version>
          <scope>runtime</scope>
        </dependency>
    

    For Gradle users:

    dependencies {
        runtimeOnly "org.cache2k:cache2k-jcache:1.4.0.Final"
    }
    

    ๐Ÿ”ง Implementation details, tuning tips and hints on configuration can be found at: JCache - cache2k User Guide