Skip to content
/ cache2k Public
forked from cache2k/cache2k

Lightweight, high performance Java caching

License

Notifications You must be signed in to change notification settings

txodds/cache2k

 
 

Repository files navigation

License Stack Overflow Maven Central

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

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

More...

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

About

Lightweight, high performance Java caching

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.6%
  • Other 0.4%