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:

    <dependency>
      <groupId>org.cache2k</groupId>
      <artifactId>cache2k-base-pom</artifactId>
      <version>1.1.4.Beta</version>
      <type>pom</type>
    </dependency>

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:

    <dependency>
      <groupId>org.cache2k</groupId>
      <artifactId>cache2k-jcache</artifactId>
      <version>1.1.4.Beta</version>
      <scope>runtime</scope>
    </dependency>

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.0.Final. Last Published: 2018-08-23.