This is the first release candidate for version 1.2. Please give feedback to help stabilize and improve the next version.

Fixes and Improvements

  • Rename MutableCacheEntry.getRefreshTime to MutableCacheEntry.getRefreshedTime
  • Change ConfigurationException source location message to standard, like (cache2k.xml:123) direct highlighting and click in IntelliJ works
  • Various modifications in the configuraiton:
  • Default value in variables: E.g. ${env.CACHE_SIZE:-2000}, uses the environment variable or 2000 if not present
  • No element <users> in the <properties>
  • <parameters> element for bean values to the customizer suppliers
  • The scope for the system properties is renamed from prop to sys.
  • A variable without scope (e.g. ${xy}) refers to the properties section in the configuration file
  • Variable (e.g. env and sys) scopes in the configuration are changed to lower case

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.1.4.Beta'

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.1.4.Beta"

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

Back to top

Version: 1.2.1.Final. Last Published: 2019-03-08.