Skip to content

cache2k/cache2k

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 2, 2025
6cf589e · Feb 2, 2025
Dec 21, 2021
Sep 2, 2022
Feb 7, 2022
Mar 24, 2022
Nov 1, 2022
Feb 7, 2022
Nov 1, 2022
Feb 7, 2022
Feb 7, 2022
Feb 7, 2022
Feb 7, 2022
Feb 7, 2022
Feb 22, 2022
Feb 7, 2022
Apr 11, 2022
Feb 7, 2022
May 24, 2022
Feb 7, 2022
Feb 15, 2022
Dec 21, 2021
Feb 7, 2022
Feb 7, 2022
Nov 1, 2022
Feb 7, 2022
Nov 1, 2022
Nov 20, 2020
Oct 30, 2021
Oct 30, 2021
Apr 7, 2016
Feb 2, 2025
Nov 21, 2020
Feb 11, 2022
Oct 28, 2021

Repository files navigation

License Stack Overflow Maven Central CircleCI

cache2k Java Caching

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

  Cache<String,String> cache = new Cache2kBuilder<String, String>() {}
    .expireAfterWrite(5, TimeUnit.MINUTES)    // expire/refresh after 5 minutes
    .setupWith(UniversalResiliencePolicy::enable, b -> b // enable resilience policy
      .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
    .build();

For a detailed introduction continue with Getting Started.

Features at a glance

Integrations

More...

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

Contributing

See the Contributor Guide.