cache2k

Additional

Language
Java
Version
v2.6.1.Final (Feb 7, 2022)
Created
Dec 18, 2013
Updated
Apr 17, 2023
Owner
cache2k
Contributors
Dmitriy Voronin (dsvoronin)
Ayman Abdel Ghany (AymanDF)
Jens Wilke (cruftex)
Andreas Worm (globalworming)
Alexei S (shpikat)
Marcel Schnelle (mannodermaus)
Filipe M. (filipemanuelofs)
7
Activity
Badge
Generate
Download
Source code

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.