by cache2k

cache2k / cache2k

Lightweight, high performance Java caching

447 Stars 53 Forks Last release: 17 days ago (v1.6.0.Final) Apache License 2.0 2.1K Commits 46 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

License Stack Overflow Maven Central

cache2k Java Caching

cache2k is an in-memory high performance Java Caching library.

  Cache cache = new Cache2kBuilder() {}
    .expireAfterWrite(5, TimeUnit.MINUTES)    // expire/refresh after 5 minutes
    .resilienceDuration(30, TimeUnit.SECONDS) // cope with at most 30 seconds
                                              // outage before propagating 
                                              // exceptions
    .refreshAhead(true)                       // keep fresh when expiring
    .loader(this::expensiveOperation)         // auto populating function

For a detailed introduction continue with Getting Started.

Features at a glance


  • Spring Framework
  • Scala Cache
  • Datanucleus (via JCache)
  • Hibernate (via JCache)
  • .... and probably more, please raise an issue and get it listed!


For more documentation and latest news, see the cache2k homepage.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.