cache2k v1.3.1.Alpha Release Notes

Release Date: 2019-08-26 // 9 months ago
  • 🆕 New and Noteworthy

    • AsyncCacheLoader, eviction listener and eviction improvements

    API Changes

    🆕 New methods:

    • CacheInfoMXBean.isWeigherPresent()
    • CacheInfoMXBean.isLoaderPresent()
    • CacheInfoMXBean.getCurrentWeight()
    • CacheInfoMXBean.getMaximumWeight()
    • Cache.getStatistics()

    🆕 New interface:

    • AsyncCacheLoader

    🛠 Fixes and Improvements

    • ✂ Remove randomized hash seed and simplify the "rehashing" of hash codes identical to Java
      HashMap and ConcurrentHashMap
    • 🛠 Fix CacheManager.setDefaultName, see GH#108
    • 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

Previous changes from v1.2.3.Final

  • 🐎 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 is a bugfix / service release.

    🌲 This change log lists changes since the last version 1.2.2.Final.

    🔄 Changes

    • 🛠 Fix startup problem on Android when ProGuard is not used, [GH#102](mvn -Psonatype-oss-release -DskipTests -DgitSha1=$sha1 -DgitBranch=$branch nexus-staging:release

    Using this cache2k version

    The binaries are available on maven central.

    For Java SE/EE and Android environments

    For Maven users:


    Recommended for Gradle users:

    def cache2kVersion = '1.2.3.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:


    For Gradle users:

    dependencies {
        runtimeOnly "org.cache2k:cache2k-jcache:1.2.3.Final"

    🔧 Implementation details, tuning tips and hints on configuration can be found at: JCache - cache2k User Guide