About this project
Caffeine is an Apache-2.0-licensed Java library for building in-memory caches. Its `Caffeine.newBuilder()` API lets developers configure caches with a maximum size, expiration after write or access, refresh after write, and a loading function for cache misses.
Documented capabilities include:
- Synchronous or asynchronous automatic loading of entries
- Size-based eviction using frequency and recency when a maximum is exceeded
- Time-based expiration based on last access or last write
- Asynchronous refresh when the first stale request arrives
- Weak keys and weak or soft values
- Notifications for evicted or otherwise removed entries
- Propagation of writes to an external resource
- Cache access statistics
The project provides optional JSR-107 JCache and Guava adapter modules, plus a simulation module. It documents community integrations with Spring, Play Framework, Micronaut, Kotlin Coroutines, Bootique, Quarkus, Camel, Scala and Kotlin wrappers, and JHipster. The README also lists infrastructure and data systems that use it, such as Cassandra, Kafka, HBase, Solr, Infinispan, Neo4j, and Druid.
Caffeine is distributed through Maven Central and Gradle. The README states that the 3.x line is for Java 11 and above, while 2.x supports older Java versions. A user's guide, API documentation, release notes, benchmark notes, and architecture articles are linked from the repository.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.