Caffeine is a high performance Java caching library providing a near optimal hit rate. A Cache is similar to ConcurrentMap, but not quite the same. The most fundamental difference is that a ConcurrentMap persists all elements that are added to it until they are explicitly removed. A Cache on the other hand is generally configured to evict entries automatically, in order to constrain its memory footprint. In some cases a LoadingCache or AsyncLoadingCache can be useful even if it doesn't evict entries, due to its automatic cache loading. To improve integration, JSR-107 JCache and Guava adapters are provided in extension modules. JSR-107 standardizes a Java 6 based API to minimize vendor specific code at the cost of features and performance. Guava's Cache is the predecessor library and the adapters provide a simple migration strategy. Automatic loading of entries into the cache, optionally asynchronously and size-based eviction when a maximum is exceeded based on frequency and recency.

Features

  • Time-based expiration of entries, measured since last access or last write
  • Asynchronously refresh when the first stale request for an entry occurs
  • Keys automatically wrapped in weak references
  • Values automatically wrapped in weak or soft references
  • Notification of evicted (or otherwise removed) entries
  • Writes propagated to an external resource
  • Accumulation of cache access statistics

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow Caffeine

Caffeine Web Site

You Might Also Like
Our Free Plans just got better! | Auth0 by Okta Icon
Our Free Plans just got better! | Auth0 by Okta

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your secuirty. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Caffeine!

Additional Project Details

Operating Systems

Windows

Programming Language

Java

Related Categories

Java Libraries

Registered

2021-06-14