Skip to content
CAI
Software that uses CAICheck a score

ben-manes/caffeine

66.6

Adequate · 25 September 2026

72.6k

lines of production code

Java

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a high-performance, concurrent caching library for Java that provides in-memory caching with support for asynchronous operations, expiration policies, and detailed statistics. It includes a comprehensive simulator for evaluating and comparing various cache eviction algorithms against real-world and synthetic access traces. Additionally, the project offers adapters for interoperability with Guava and JCache (JSR-107), along with example implementations for integration with Hibernate, Reactor, and RxJava.

How it got here

2014–2015 — Async support, JCache compliance, and simulator expansion

58 changes.

The project introduced asynchronous cache operations and a comprehensive statistics API, while establishing full JCache (JSR-107) compliance through a new provider module. Concurrently, the cache simulator was significantly expanded with numerous eviction policies, trace format parsers, and benchmarking tools to evaluate algorithm performance against real-world data.

2016–2023 — Simulator expansion and adaptive tuning

54 changes.

The project significantly expanded its cache simulator with diverse trace parsers, new eviction policies, and adaptive window tuning via hill-climbing optimizers. Concurrently, it enhanced the core library with Java module support, JCache integration tests, and practical examples for RxJava, Reactor, and Hibernate.

2024–2026 — Concurrency verification and build infrastructure

45 changes.

This period focused on rigorously verifying the thread-safety and correctness of Caffeine's concurrent data structures through extensive model-checking, stress testing, and compatibility suites. Simultaneously, the project overhauled its build system by introducing standardized Gradle plugins for quality, lifecycle, and analysis, while updating JVM toolchain configurations.

Features

Add Bélády's optimal and unbounded cache policies to the simulator

The simulator now includes two new cache replacement policies in the \opt\ package: \ClairvoyantPolicy\, which implements Bélády's optimal page replacement algorithm by evicting the item accessed farthest in the future (requiring a clairvoyant trace reader), and \UnboundedPolicy\, which simulates a cache with no maximum size to establish the theoretical upper bound of hit rates by accounting only for compulsory misses. These additions allow users to benchmark existing policies against the optimal theoretical performance and understand the impact of cache capacity limits.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/opt · high confidence

Add Caffeine resilience example using Failsafe

Added a new example demonstrating how to integrate the Failsafe library with Caffeine to handle intermittent failures. The example covers retry, timeout, and fallback strategies for both synchronous and asynchronous cache operations, helping users implement resilient caching patterns.

examples/resilience-failsafe · high confidence

Add CoalescingBulkLoader example with Reactor-based batch loading

This change introduces a new example demonstrating how to use Project Reactor to coalesce independent asynchronous cache loads into batches. The example provides a \CoalescingBulkLoader\ implementation that buffers requests using \bufferTimeout\ to reduce load on the source system, supporting both synchronous and asynchronous cache loaders. It includes a comprehensive test suite verifying batch size limits, time-based triggering, duplicate key handling, and error propagation.

examples/coalescing-bulkloader-reactor · high confidence

Add CountMin64-based TinyLFU admission policy to the cache simulator

The simulator now includes a new admission policy implementation based on the TinyLFU algorithm, located in the \simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/admission/countmin64\ package. This change introduces \CountMin64\, a Count-Min Sketch data structure for frequency estimation, and \CountMin64TinyLfu\, which implements the \Frequency\ interface to manage cache admissions using conservative updates and periodic counter resets. The package is also configured with JSpecify null-marking and Error Prone's \@CheckReturnValue\ annotations to enforce stricter code quality.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/admission/countmin64 · high confidence

Add GL-Cache trace support to the simulator

The simulator now includes a new GLCacheTraceReader that allows users to parse and simulate traces from the GL-Cache project. This reader handles the specific binary format of GL-Cache traces, correctly interpreting object IDs and sizes as unsigned values to ensure accurate weight calculations during simulation.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/glcache · high confidence

A new example project for building GraalVM native images has been added to the examples directory. To ensure consistent build tooling, the example's Gradle wrapper files (the JAR and properties) are now implemented as symbolic links pointing to the project's central wrapper location, allowing the example to use the same Gradle version as the main project without duplicating files.

examples/graal-native/gradle · high confidence

Add GraalVM native image example

A new example project has been added to demonstrate building Caffeine as a GraalVM native executable. This includes the necessary native-image configuration files (reflection, JNI, resource, and serialization configs) to support ahead-of-time compilation, along with a README detailing the steps to run the agent, generate metadata, and compile the native binary.

examples/graal-native · high confidence

Add Hibernate caching example with JPA entities

The hibernate example module now includes JPA entity classes (Project, Skill, User) annotated with Hibernate's @Cache(usage = READ\_WRITE) to demonstrate second-level cache integration.

hibernate · high confidence

Add Hibernate second-level cache example

Added a new example demonstrating how to configure Caffeine as a JCache provider for Hibernate's second-level cache. The example includes configuration files for enabling query and entity caching, a sample entity model with caching annotations, and unit tests verifying cache hit/miss behavior for both entity lookups and HQL queries.

examples/hibernate · high confidence

Add IBM ObjectStore trace support to the simulator

The simulator now includes a new \ObjectStoreTraceReader\ capable of parsing IBM ObjectStore trace files from the SNIA repository. This reader processes REST.GET.OBJECT events, mapping the object size from the trace directly to the cache entry weight, enabling weighted eviction policies for this specific workload. The package also adopts jspecify null-marking and error-prone return-value checks.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/snia/keyvalue · high confidence

Add JCache configuration reference file

A new reference.conf file has been added to the JCache module, providing default settings for Caffeine-backed caches. This file defines the structure for configuring key and value types, store-by-value strategies, executors, schedulers, listeners, read/write-through loaders, monitoring options, and various expiration policies (lazy, eager, and variable). It also includes configuration for cache size limits, weighers, and listener definitions, allowing users to override these defaults in their application.conf.

jcache/src/main/resources · high confidence

Add Java module descriptor for Guava adapters

A module-info.java file has been added to the guava module, officially declaring it as the com.github.benmanes.caffeine.guava module. This descriptor exports the adapter package and declares transitive dependencies on the core Caffeine and Guava libraries, while also including static requirements for Error Prone and JSpecify annotations to support compile-time checks.

guava/src/main/java · high confidence

Add LibCacheSim trace readers for CSV, Oracle, and Twitter formats

The simulator now includes new trace readers for three LibCacheSim data formats: a CSV reader for cloud physics IO traces, a binary reader for Oracle General traces, and a CSV reader for Twitter cluster traces. All three readers support weighted access events, allowing the simulator to accurately model cache behavior based on object sizes provided in these external datasets.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/libcachesim · high confidence

Add Outbrain trace support and migrate to jspecify annotations

The simulator now includes an OutbrainTraceReader to parse page-view logs from the Outbrain Kaggle dataset, allowing users to simulate caches using this specific trace format. Additionally, the kaggle parser package has migrated its null-safety annotations from the Checker Framework to jspecify, updating the package-level configuration to use @NullMarked and @CheckReturnValue.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/kaggle · high confidence

Add SNIA Cambridge trace reader with hostname-namespaced keys

Users can now parse SNIA MSR Cambridge trace files via the new CambridgeTraceReader. The reader filters for read operations and expands contiguous block requests into individual keys. To prevent disk-number collisions across different hosts, keys are namespaced by hashing the hostname and disk ID, ensuring accurate simulation results for multi-host traces.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/snia/cambridge · high confidence

Add SNIA Enterprise trace format support to the simulator

The simulator now includes a new reader for SNIA Microsoft Enterprise trace files (Event Tracing for Windows format). This addition allows users to analyze block I/O traces by parsing disk read operations, where keys are generated using the disk number and block address, with support for requests that span trailing 4 KiB blocks. The implementation uses jspecify annotations for null-safety.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/baleen, simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/lirs, simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/snia/enterprise · high confidence

Add Thesios trace file parser for cache simulation

Users can now parse Google Thesios storage server I/O traces within the cache simulator. A new ThesiosTraceReader class processes READ events from CSV files, using the file path and offset as the cache key and the requested byte size as the access weight, enabling simulation of workloads derived from these specific server logs.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/thesios · high confidence

Add TinyCache admission policy to the cache simulator

The simulator now includes a new TinyCache admission policy, allowing users to simulate caches that use a ghost cache for admission decisions and random eviction. This addition introduces a suite of new classes in the \simulator.admission.tinycache\ package, including \TinyCacheAdapter\ (which implements the \Frequency\ interface), \TinyCacheSketch\ (the underlying sketch data structure), \TinyCache\ and \TinyCacheWithGhostCache\ (the core cache models), and supporting utilities like \HashFunctionParser\ and \TinySetIndexing\ for efficient memory layout and indexing.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/admission/clairvoyant, simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/admission/tinycache · high confidence

Add TinyCache-based cache simulation policies

The simulator now includes three new cache eviction policies based on the TinyCache sketch algorithm: TinyCache, TinyCache with Ghost Cache, and Window TinyCache. These policies allow users to simulate and evaluate the performance of TinyCache-based admission strategies alongside existing algorithms.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/tinycache · high confidence

Add UC SD application address trace support

The simulator now includes a new \AddressTraceReader\ capable of parsing application address instruction traces from UC San Diego. This reader interprets hexadecimal addresses as unsigned long values, enabling users to simulate cache behavior using this specific trace format.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/address · high confidence

Add UMass YouTube trace support to the simulator

The simulator now includes a new YoutubeTraceReader that parses UMass network trace files, filtering for GETVIDEO requests and mapping them to cache keys using Murmur3 hashing. This enables users to simulate cache behavior against YouTube traffic patterns. The package also adopts jspecify annotations for null-safety.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/umass/network · high confidence

Add UMass storage trace support

The simulator now includes a new StorageTraceReader that parses UMass Trace Repository storage logs, extracting read operations and generating cache keys by combining the ASU and start block number. This enables users to simulate cache behavior using UMass storage traces, with the package also adopting jspecify annotations for null-safety.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/umass/storage · high confidence

Add Wikipedia trace file parser to simulator

The simulator now includes a new WikipediaTraceReader that processes trace files from the Wikibench project. This reader filters out non-read requests, user-related pages, and special actions, while sanitizing URLs by stripping hosts and replacing HTML entities. It converts request paths into long keys using MurmurHash3, enabling users to simulate cache performance against real-world Wikipedia access patterns.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/scarab, simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/snia/systor, simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/wikipedia · high confidence

Add cachelib trace file support to the simulator

The simulator now includes a new CachelibTraceReader that allows users to analyze trace files generated by the cachelib project. This reader parses CSV-formatted traces, supporting both GET and GET\_LEASE operations, and calculates access weights by combining the operation size and key size fields. The implementation is annotated with jspecify null-marking for improved type safety.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/cachelib, simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/lrb · high confidence

Add support for Camelab trace file parsing

The simulator now includes a new CamelabTraceReader that enables parsing of trace files from the Camelab project. This reader interprets the specific format of Camelab logs, extracting contiguous sector keys for read operations while ignoring write operations, allowing users to analyze cache performance using this specific trace dataset.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/camelab · high confidence

Add support for K5cloud and Tencent trace formats

The simulator now includes dedicated readers for K5cloud and Tencent storage traces, enabling users to simulate cache performance against these specific SNIA trace datasets. The K5cloud reader parses block-level access logs, while the Tencent support covers both block storage and photo cache traces, with the latter distinguishing access weights by image format (JPEG or WebP) and size category.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/snia/parallel · high confidence

Add support for LIRS2 trace format in the simulator

The simulator now includes readers and writers for the binary trace format used by the LIRS2 algorithm (provided by Cloud Physics). Users can parse LIRS2 trace files to simulate cache policies and export trace data in this specific format, enabling compatibility with LIRS2-based research and tooling.

_simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/cloud\physics · high confidence

Add support for Tragen synthetic trace files

The cache simulator now includes a new parser for trace files generated by the Tragen synthetic trace generator. Users can process these CSV-formatted traces, which contain keys and weights, via the new TragenTraceReader class. The package also adopts jspecify null-marking annotations to improve static analysis.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/tragen · high confidence

Add support for reading ARC algorithm trace files

The simulator now includes a new \ArcTraceReader\ component capable of parsing trace files generated by the authors of the ARC (Adaptive Replacement Cache) algorithm. This addition allows users to simulate cache performance using these specific external datasets, which define access patterns via start blocks and sequence counts. The implementation is located in the \simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/arc\ package and utilizes the \jspecify\ annotations for null-safety.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/arc · high confidence

Added AdaptSize trace reader and writer for weighted cache simulations

New \AdaptSizeTraceReader\ and \AdaptSizeTraceWriter\ classes have been added to the simulator's parser package to support trace files from the AdaptSize algorithm. The reader parses key and weight data, using a Murmur3 hash of the key and weight to treat identical keys with different weights as unique entries, enabling simulations of large caches in weighted policy types. The writer outputs events in the corresponding AdaptSize format.

_simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/adapt\size · high confidence

Added Eclipse IDE configuration for static analysis and launch profiles

Developers using Eclipse can now import the project with built-in support for the Eclipse Compiler (ECJ) and standardized static analysis. The new \org.eclipse.jdt.core.prefs\ file enforces strict null-safety checks using jspecify annotations, treats various code quality issues (such as dead code, unused imports, and missing Javadoc) as errors, and enables resource analysis. Additionally, a \Simulator.launch\ configuration is provided to easily run the Caffeine cache simulator directly from the IDE.

gradle/config/eclipse · high confidence

Added JMH benchmark implementations for Count-Min and TinyLfu sketches

This change introduces new Java source files under the JMH benchmarking directory to provide optimized, benchmark-ready implementations of probabilistic frequency sketches. Specifically, it adds a \CountMinSketch\ class that implements a 4-bit Count-Min sketch with periodic aging for the TinyLFU admission policy, and a \TinyLfuSketch\ interface serving as a facade for these benchmark implementations. These additions allow performance testing of the underlying sketch algorithms used in Caffeine's cache admission logic.

caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/sketch · high confidence

Added benchmark adapters for multiple cache implementations

Added new JMH benchmark adapter classes for Caffeine, Cache2k, Coherence, Ehcache 3, Guava, Hazelcast, TCache, and a bounded LinkedHashMap, enabling direct performance comparison of these libraries against Caffeine in the same benchmark suite.

caffeine/src/jmh/java/com/github/benmanes/caffeine/cache/impl · high confidence

Added cache profiler tool for performance inspection

A new profiler hook and cache profiler implementation have been added to the JMH benchmarking suite, allowing developers to attach external profilers to inspect cache performance. The CacheProfiler class initializes a Caffeine cache with a Zipfian access pattern and runs continuous read or write loops across multiple threads, while the ProfilerHook base class manages thread execution and displays real-time throughput statistics to the console.

caffeine/src/jmh/java/com/github/benmanes/caffeine/profiler · high confidence

Added documentation for the Adaptive Window feature

A new wiki page titled 'The Adaptive Window, From the Ground Up' has been added to explain how Caffeine adapts the W-TinyLFU admission window at runtime. The page includes responsive styling with support for both light and dark color schemes to improve readability.

wiki · high confidence

Added reference implementations of LIRS and Clock-Pro cache replacement algorithms

The simulator now includes reference C source code and headers for the LIRS (Low Inter-reference Recency Set) and Clock-Pro cache replacement algorithms. These files, located in the simulator's LIRS parser resources, provide the underlying logic for simulating these specific eviction policies, allowing users to benchmark cache performance using these advanced algorithms alongside existing ones.

simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/lirs · high confidence

Externalized JCache configuration via Typesafe Config

Caches can now be configured via external settings files (e.g., HOCON/JSON) using the Typesafe Config library. The new \TypesafeConfigurator\ reads cache definitions from the \caffeine.jcache\ section, allowing users to define default and named cache settings without code. This includes support for pluggable factory creation via \FactoryCreator\ and custom configuration loading via \ConfigSource\, enabling integration with dependency injectors and URI-based resource loading.

jcache/src/main/java/com/github/benmanes/caffeine/jcache/configuration · high confidence

Gradle wrapper and JVM toolchain configuration for the indexable example

The indexable example now includes a dedicated Gradle wrapper and a \gradle-daemon-jvm.properties\ file that configures automatic JVM toolchain provisioning via the Foojay Disco API. This setup allows the example to automatically download and use the specified JDK version (version 25) across Linux, macOS, Windows, and FreeBSD on both x86\_64 and AArch64 architectures, ensuring consistent build environments without manual JDK installation.

examples/indexable/gradle · high confidence

Initial JCache (JSR-107) implementation

This change introduces the initial implementation of the JCache (JSR-107) API for Caffeine. It adds the core infrastructure required to manage caches, including \CacheManagerImpl\ for creating and retrieving caches, \CacheFactory\ for building cache instances from configurations, and \CacheProxy\ as the main entry point for standard cache operations. The implementation also includes \LoadingCacheProxy\ for caches with automatic loading capabilities, \EntryProxy\ for entry iteration, and \Expirable\ to handle value expiration metadata. This provides the foundational layer for JCache compliance, enabling users to interact with Caffeine caches using the standard JCache interface.

jcache/src/main/java/com/github/benmanes/caffeine/jcache · high confidence

Initial JCache (JSR-107) provider implementation

This release introduces the \CaffeineCachingProvider\, a new SPI implementation that allows applications to use Caffeine as a backend for JCache (JSR-107). The provider supports standard JCache operations, including creating cache managers with specific URIs and class loaders, and explicitly advertises support for the \STORE\_BY\_REFERENCE\ optional feature. It also includes specific handling for OSGi environments via the \@Component\ annotation and manages classloader references weakly to prevent memory leaks.

jcache/src/main/java/com/github/benmanes/caffeine/jcache/spi · high confidence

Initial release of the cache simulator with configurable policies and reporting

The simulator is now available with a default configuration file defining a comprehensive set of caching policies (including LRU, LFU, ARC, LIRS, TinyLFU variants, and various product integrations like Caffeine and Guava), admission strategies, membership filters, and reporting formats (table or CSV). Users can now run simulations using these pre-configured defaults or override specific parameters such as cache size, random seed, and policy-specific tuning options.

simulator/src/main/resources · high confidence

Introduce JCache EntryProcessor support

Added the internal processor components required to support the JCache \Cache.invoke()\ API. This includes the \Action\ enum to track entry mutations (such as CREATED, UPDATED, or DELETED) and the \EntryProcessorEntry\ class, which implements \MutableEntry\ to manage key-value state and lazy loading via a \CacheLoader\ during processor execution. These changes enable the cache to process entries atomically using user-defined processors.

jcache/src/main/java/com/github/benmanes/caffeine/jcache/processor · high confidence

Introduce JCache event dispatching with per-key ordering and parallel execution

The JCache adapter now includes a new event dispatching system in the \com.github.benmanes.caffeine.jcache.event\ package. This system ensures that cache entry listeners receive events in the order of actions performed on specific keys, while allowing parallel execution for different keys. It supports synchronous and asynchronous listener execution, filters events with exception handling, and adapts eviction events to the JCache listener model.

jcache/src/main/java/com/github/benmanes/caffeine/jcache/event · high confidence

Introduce code generation for specialized cache and node types

The library now uses a JavaPoet-based code generator to produce specialized, inheritance-based implementations of cache entries and local caches. By defining a matrix of features (such as key/value strength, expiration policies, and size limits), the system generates optimized classes that include only the necessary fields and methods, reducing memory overhead and improving performance for specific configurations.

caffeine/src/javaPoet · high confidence

Introduce core simulator policy infrastructure and registry

The simulator's policy package now provides the foundational classes for simulating cache eviction strategies. This includes the \Policy\ interface for defining eviction logic, \AccessEvent\ to represent cache accesses with optional weight and penalty metadata, and \PolicyStats\ for collecting hit/miss rates and custom metrics. A \Registry\ class centralizes the registration and lookup of available policies (such as LRU, LFU, ARC, and others), and a \PolicyActor\ enables asynchronous, batched processing of access events to improve simulation performance.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy · high confidence

Introduce sampled cache replacement policies in the simulator

The simulator now includes a new \sampled\ package containing \SampledPolicy\, which implements cache replacement algorithms (such as Hyperbolic and others) that approximate classical policies by sampling entries from past evictions. This change adds the core policy implementation, configuration via \SampledSettings\, and null-safety annotations (\jspecify\, \NullMarked\) to the simulator's policy layer, enabling users to run simulations using these sampling-based eviction strategies.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sampled · high confidence

Introduction of asynchronous cache support

The cache library now supports asynchronous operations through the new \AsyncCache\ and \AsyncLoadingCache\ interfaces, allowing users to perform non-blocking loads and bulk retrievals. This change introduces the \AsyncCacheLoader\ interface for defining asynchronous loading logic and the \Async\ utility class to manage \CompletableFuture\ lifecycles, including specialized listeners and weighers that handle in-flight computations safely.

caffeine/src/main/java/com/github/benmanes/caffeine/cache · high confidence

JCache integration now supports CacheWriter and CacheLoader adapters

The JCache integration module now includes support for JCache's CacheWriter and CacheLoader interfaces. A new DisabledCacheWriter implementation is provided for scenarios where no external store is needed, while the JCacheLoaderAdapter bridges JCache loaders with Caffeine's caching engine, handling value copying, expiry policies, and statistics recording. This enables users to configure caches that automatically persist changes and load missing entries from an external source, aligning the library more closely with the full JCache (JSR-107) specification.

jcache/src/main/java/com/github/benmanes/caffeine/jcache/integration · high confidence

JCache management and statistics via JMX

This change introduces JCache-compliant JMX management capabilities for Caffeine caches. It adds new management beans (JCacheMXBean and JCacheStatisticsMXBean) that expose cache configuration details and runtime statistics, including hit/miss counts, evictions, and operation latencies. A JmxRegistration utility handles the safe registration and unregistration of these beans with the platform MBean server, including sanitization of cache names to ensure valid JMX object names and handling of concurrent registration conflicts.

jcache/src/main/java/com/github/benmanes/caffeine/jcache/management · high confidence

JCache provider registration for Caffeine

The application now registers the Caffeine CachingProvider via the standard JCache SPI mechanism, enabling JCache-compatible caching functionality to be discovered and used automatically.

jcache/src/main/resources/META-INF · high confidence

Java module descriptor added with JSpecify annotations

The Caffeine library now includes a module-info.java file, officially declaring the module com.github.benmanes.caffeine and exporting the cache and stats packages. This change migrates null-safety annotations from the Checker Framework to JSpecify (using @NullMarked) and declares static dependencies on error-prone annotations and JSpecify, enabling proper Java Platform Module System (JPMS) support while maintaining compatibility with non-modular classpaths.

caffeine/src/main/java · high confidence

New Bloom filter implementations in the simulator

The simulator now includes three new membership sketch implementations in the bloom package: a custom BloomFilter with improved hashing, a FastFilter adapter wrapping the FastFilter library, and a GuavaBloomFilter wrapper. These provide users with alternative probabilistic data structures for cache membership testing, each configurable via the simulator's configuration settings.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/membership/bloom · high confidence

New CSV-based simulation reporting and charting

The simulator now generates simulation results as CSV files and produces line charts from those reports. A new CsvReporter writes policy metrics to CSV, while CombinedCsvReport merges multiple CSV runs (varying by cache size) into a single comparison file. PlotCsv then reads this combined CSV to generate a PNG line chart, allowing users to visualize metrics like hit rate across different cache sizes and policies.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/report/csv · high confidence

New Claude hooks enforce audit reporting and test scoping

Added three new hooks in .claude/hooks to enforce development workflows. The audit-report-guard.sh script prevents the 'auditor' subagent from stopping without writing its mandatory report to .local/audits/, blocking the stop if the file is missing. The test-scope-guard.sh script blocks Gradle test invocations that run entire @CacheSpec classes or the full suite, requiring users to narrow tests to specific methods or use -P filters. The recover-agent.py script provides a way to extract persisted work (files written, commands run, prose) from a dead subagent's transcript to aid in relaunching the task without repeating expensive operations.

.claude/hooks · high confidence

New CoalescingBulkLoader example with fair backpressure

Added a new example implementation of an AsyncCacheLoader that accumulates cache miss keys and performs bulk loads when a specified size or time limit is reached. The implementation uses Project Reactor to manage the loading pipeline and specifically configures fair backpressure on the unicast sink to prevent thread starvation under high load. This example demonstrates how to batch individual lookups efficiently while handling duplicate keys and parallel execution.

coalescing-bulkloader-reactor · high confidence

New Count-Min 4 sketch variants for cache admission simulation

The simulator now includes a new Count-Min 4 probabilistic frequency sketch package with four distinct aging strategies: a standard periodic reset, an incremental reset that ages counters gradually, a climber reset that dynamically adjusts its aging step size based on miss rates, and an indicator reset that uses an external indicator to guide the aging process. These sketches allow the simulator to more accurately model cache admission policies by providing finer control over how frequency estimates decay over time, with options for conservative updates and doorkeeper filtering to improve accuracy.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/admission/countmin4 · high confidence

New Gradle plugins for JCStress, JMH, and Object Layout analysis

Added three new Gradle build plugins to the analyze module to support advanced concurrency testing, performance benchmarking, and memory analysis. The \jcstress.caffeine.gradle.kts\ plugin configures the JCStress framework for validating concurrent code correctness, including specific JVM argument handling for JDK 25+. The \jmh.caffeine.gradle.kts\ plugin integrates the Java Microbenchmark Harness (JMH) with support for async-profiler integration to generate flame graphs in CI, and enables caching for faster benchmark runs. The \object-layout.caffeine.gradle.kts\ plugin adds tasks using the Java Object Layout (JOL) tool to inspect object memory footprints and field layouts.

gradle/plugins/src/main/kotlin/analyze · high confidence

New Gradle quality and static analysis plugins

The build now includes a suite of new Gradle plugins in the quality directory to enhance code quality and security. These plugins integrate Error Prone and NullAway for stricter compile-time checks, ECJ for Eclipse Java compiler analysis, and PMD, SpotBugs, and Forbidden APIs for static code analysis. It also adds OWASP Dependency-Check for vulnerability scanning, Roseau for API compatibility verification, and comprehensive JaCoCo coverage reporting with SonarQube integration.

gradle/plugins/src/main/kotlin/quality · high confidence

New Guava cache adapter package

Added a new \com.github.benmanes.caffeine.guava\ package that provides adapters to wrap Caffeine caches in Guava's \Cache\ and \LoadingCache\ interfaces. This allows users to expose Caffeine caches as Guava-compatible instances via \CaffeinatedGuava.build()\ and adapt Guava \CacheLoader\ implementations to Caffeine using \CaffeinatedGuava.caffeinate()\, facilitating interoperability between the two libraries.

guava/src/main/java/com · high confidence

New IndexedCache example for alternative key lookups

The indexable example now includes an IndexedCache implementation that allows cache entries to be retrieved by secondary keys in addition to the primary key. This new class mirrors database indexing by storing the value once and maintaining mappings from alternative index functions to the primary key, enabling efficient lookups by attributes other than the main identifier.

examples/indexable/src/main · high confidence

New JCache expiry policy implementation with null-safety annotations

Added a new JCacheExpiryPolicy class that implements the javax.cache.expiry.ExpiryPolicy interface, allowing users to define custom expiration durations for cache creation, update, and access events. The implementation includes proper serialization support and equality checks based on the configured durations. The package also introduces null-safety annotations via jspecify (NullMarked) and ErrorProne (CheckReturnValue) to improve static analysis and prevent null-pointer issues in expiry policy usage.

jcache/src/main/java/com/github/benmanes/caffeine/jcache/expiry · high confidence

New MiniSim and Indicator-based window adaptation strategies for W-TinyLFU

The simulator introduces two new hill-climbing strategies to automatically tune the window and probation sizes for the Window-TinyLFU policy. The new \MiniSimClimber\ implements the Miniature Simulation algorithm, maintaining sampled miniature caches to estimate miss rates and adapt the window size toward the configuration that minimizes misses. Additionally, the \IndicatorClimber\ adjusts the window size based on an access indicator value, increasing or decreasing the window proportionally to changes in the indicator. These components allow the simulator to automatically discover optimal segment sizes for W-TinyLFU without manual tuning.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/climbing/sim · high confidence

New Perfect Frequency admission policy with periodic aging

The simulator now includes a new PerfectFrequency admission policy that tracks access counts using a periodic reset mechanism. When the sample size is reached, entry frequencies are halved and zero-count entries are removed, enabling aging behavior for perfect-frequency simulations. The package also adopts jspecify annotations for null-marking and return-value checking.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/admission/perfect · high confidence

New RandomRemovalFrequencyTable for cache admission simulation

The simulator now includes a new \RandomRemovalFrequencyTable\ implementation for the \Frequency\ interface, allowing users to simulate cache admission policies that use random removal to manage frequency estimates. This probabilistic multiset tracks element popularity within a time window, controlled by a sample factor, and is intended to evaluate the feasibility of TinyTable alternatives. The package also adopts jspecify null-marking and error-prone annotations for improved static analysis.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/admission/table · high confidence

New RxJava 3 write-behind cache writer example

The write-behind-rxjava example now demonstrates a write-behind cache writer implementation using RxJava 3. This new example shows how to batch and coalesce cache updates asynchronously, providing a practical pattern for aggregating changes before writing them to a data store.

writebehind-rxjava · high confidence

New RxJava write-behind cache example

Added a new example demonstrating how to implement a write-behind cache using RxJava. This example shows how to use RxJava's buffer operator to asynchronously batch cache updates and write them to an external resource, including tests that verify the pipeline remains resilient to errors during the write or coalescing phases.

examples/write-behind-rxjava · high confidence

New TinyLFU admission policy for the cache simulator

The simulator now includes a TinyLFU admission policy that filters new entries based on their estimated access frequency, allowing only candidates with higher frequency than the victim to be admitted. This feature is configurable via sketch types (Count-Min Sketch variants, Tiny-Table, Count-Min-64, and perfect/random tables) and supports optional admission jitter to improve performance under specific access patterns.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/admission · high confidence

New W-TinyLfu simulator policy with adaptive admission window

The simulator now includes a new W-TinyLfu policy implementation that combines a temporal admission window with a Segmented LRU main space. This policy allows entries to enter a window based on recency, where they are evaluated by frequency before being promoted to the main protected/probation regions, improving hit rates for workloads with high temporal locality. The implementation relies on a new Indicator class to measure recency vs. frequency bias and uses long keys for simulator events.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch · high confidence

New adaptive cache simulation policies with feedback-driven tuning

The simulator now includes two new cache eviction policies: FeedbackTinyLfu and FeedbackWindowTinyLfu. These policies dynamically adjust their behavior based on workload characteristics by using a feedback mechanism to tune parameters like arrival emphasis and admission window size, allowing them to adapt between favoring recency or frequency as the workload changes.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/feedback · high confidence

New adversarial audit skills for cache subsystems

Added a suite of new \.claude/skills\ configuration files that define structured, adversarial audit workflows for the cache library. These skills instruct an AI auditor to perform deep, hostile code reviews across specific domains—including adaptive window logic, adversarial inputs, arithmetic boundaries, JCache conformance, and memory model correctness—by providing detailed scope boundaries, invariant checks, and output formats to uncover implementation defects that standard testing might miss.

.claude/skills · high confidence

New and improved hill-climbing policy optimizers in the cache simulator

The simulator's hill-climbing policy optimization package now includes four distinct climber implementations: a new CorrelationClimber that uses the correlation between window moves and hit-rate changes to guide step direction and magnitude; a rewritten SimpleClimber with adaptive decay rates and sample periods specifically tuned for small cache sizes; a rewritten SimulatedAnnealingClimber implementing a derivative-free Metropolis search with geometric cooling and random restarts to handle non-stationary workloads; and a new TrustRegionEwmaClimber that uses EWMA-smoothed gain ratios to manage step sizes within a stable trust region. These changes replace previous implementations with more robust algorithms for automatically tuning cache admission window sizes during policy simulations.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/climbing/hill · high confidence

New cache replacement policies added to the simulator

The simulator now includes several new cache replacement algorithms in the \irr\ package, allowing users to benchmark more advanced eviction strategies. These additions include ClockPro, ClockProPlus, and ClockProSimple (Clock-based variants with adaptive hot/cold partitioning), Double Clock (DClock, mirroring the Linux page cache working set algorithm), Filtering-based Buffer Cache (FRD) with both standard, hill-climber adaptive, and indicator-based adaptive variants, and LIRS2 (an enhancement of LIRS using two most-recent reuse distances).

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/adaptive, simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr · high confidence

New cache statistics API with eviction weight tracking

Caffeine introduces a new \com.github.benmanes.caffeine.cache.stats\ package to provide detailed performance metrics for caches. Users can now access a \CacheStats\ snapshot via \Cache.stats()\ which tracks hits, misses, load success/failure counts, total load time, and eviction counts. A key addition is the \evictionWeight\ metric, allowing users to monitor the total weight of evicted entries, not just the number of evictions. The API includes a \StatsCounter\ interface for recording events, with built-in implementations like \ConcurrentStatsCounter\ for high-performance concurrent recording and \GuardedStatsCounter\ to safely wrap custom counters and prevent exceptions from disrupting cache operations.

caffeine/src/main/java/com/github/benmanes/caffeine/cache/stats · high confidence

New example demonstrating indexable cache with alternative key lookups

Added a new example in the \examples/indexable\ directory that demonstrates how to use an \IndexedCache\ to associate a single cache value with multiple unique keys (such as looking up a user by ID, username, or email). The example includes a README explaining the data-oriented programming approach using sealed interfaces and pattern matching, along with the necessary Gradle wrapper scripts to run the sample.

examples/indexable · high confidence

New gradient descent optimizers for adaptive cache tuning

The cache simulator now supports adaptive tuning of window sizes using gradient descent optimizers. This change introduces four new climbing strategies—Stochastic (SGD) with optional momentum or Nesterov acceleration, Adam, AMSGrad, and Nadam—allowing the simulator to automatically adjust cache parameters based on hit-rate gradients rather than fixed heuristics.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/climbing/gradient · high confidence

New greedy-dual cache eviction policies added to the simulator

The simulator now includes three new cache replacement policies in the \greedy\_dual\ package: CAMP (Cost Adaptive Multi-Queue), GDWheel (Greedy Dual Wheel), and GDSF (Greedy Dual Size-Frequency). These are cost-aware, weighted policies that account for entry sizes and access costs (miss penalties) to optimize eviction decisions. CAMP organizes entries into LRU queues grouped by rounded cost-to-size ratios, GDWheel uses a multi-level wheel structure to manage costs, and GDSF prioritizes entries based on frequency and cost. All three are registered as \WEIGHTED\ policies and can be selected via the simulator's configuration.

_simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/greedy\_dual, simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/two\queue · high confidence

New linked-list cache eviction policies added to the simulator

The simulator now includes several new cache eviction policies implemented using linked-list structures, allowing users to evaluate algorithms beyond the existing set. These new additions include SIEVE, which decouples the clock hand from the insertion point to reduce one-hit wonders; Segmented LRU, which partitions cache space into probationary and protected segments to favor frequently accessed items; S4 LRU, a quadruply-segmented LRU variant; MultiQueue, designed for second-level caches with frequency-based queue promotion; and a new O(1) implementation of Least/Most Frequently Used (LFU/MFU). Additionally, the existing LinkedPolicy now supports weighted entries, enabling more accurate simulation of caches where items have varying sizes.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/linked · high confidence

New simulator report formatting and output options

The simulator now supports configurable report output formats, including CSV and table-based text reports. This change introduces a new reporting infrastructure with a \Reporter\ interface and specific implementations like \CsvReporter\ and \TableReporter\, allowing users to choose how simulation results are presented. The \Metrics\ utility class handles formatting of metric values, while \TextReporter\ provides a base for console or file output with support for sorting by specific metrics. This enhances the usability of the simulator by providing structured and customizable output options for analyzing cache policy performance.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/report · high confidence

New sketch-based cache policies for simulator

The simulator now includes four new cache eviction policies under the \sketch.segment\ package: \FullySegmentedWindowTinyLfu\, \LruWindowTinyLfu\, \RandomWindowTinyLfu\, and \S4WindowTinyLfu\. These policies implement a two-tier architecture consisting of an admission window and a main storage space, allowing users to simulate and compare different window/main size ratios and eviction strategies (Segmented LRU, standard LRU, random, and S4LRU) within the simulator environment.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/segment · high confidence

New table-formatted text report for cache simulator

The simulator now includes a new TableReporter that outputs policy statistics as a formatted ASCII table. This report aligns the Policy column to the left and all other metrics to the right, applying specific formatting for percentages, doubles, and longs. It also handles Stopwatch objects by displaying their duration in a simplified format, providing a cleaner, tabular view of simulation results compared to previous text-based outputs.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/report/table · high confidence

Repository initialization and CI/CD configuration

The repository has been initialized with a comprehensive set of configuration files to support the build, testing, and development workflow. This includes a new README.md detailing the Caffeine caching library's features and integrations, a CONTRIBUTING.md guide, and an AGENTS.md file for AI assistant context. The build system is configured with a Gradle wrapper (gradlew/gradlew.bat) and various tooling configurations such as .editorconfig for code style, .gitattributes for line endings, and .codecov.yml for coverage reporting. Additionally, static analysis and security tools are configured via .deepsource.toml, .gitleaks.toml, .inferconfig, .typos.toml, and qodana.yaml, while .gitignore has been expanded to exclude local IDE and build artifacts.

(repo-wide) · high confidence

Simulator introduces pluggable hill-climbing strategies for adaptive window tuning

The cache simulator now supports adaptive admission window tuning via a new pluggable hill-climbing framework. Users can select from multiple optimization strategies—including simple hill climbing, correlation-based, trust-region EWMA, simulated annealing, and gradient descent variants (Stochastic, AMSGrad, Nadam, Adam)—as well as a MiniSim simulation-based climber and an Indicator climber. This is implemented through a new \HillClimber\ interface and \AbstractClimber\ base class, with \HillClimberType\ providing a factory for these strategies, and \HillClimberWindowTinyLfuPolicy\ applying the selected strategy to dynamically adjust the TinyLFU admission window size during simulation.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/climbing · high confidence

Simulator now generates synthetic access traces for policy evaluation

The cache simulator now supports generating synthetic access patterns instead of relying solely on external trace files. A new \Synthetic\ class and corresponding \TraceSettings\ in \BasicSettings\ allow users to configure distributions such as counter, repeating, uniform, exponential, hotspot, and various Zipfian variants via the configuration. This enables quick, reproducible testing of caching policies without needing real-world trace data.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator · high confidence

Simulator now supports benchmarking against multiple cache implementations

The simulator now includes policy implementations for several popular Java caching libraries, allowing users to benchmark eviction algorithms against real-world products. New supported products include Caffeine, Guava, Cache2k, Ehcache 3, Coherence, Hazelcast, TCache, and ExpiringMap. These implementations are available in the \simulator/policy/product\ package and can be used to compare performance and hit/miss rates across different cache providers.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/product · high confidence

Simulator parser refactored with new base readers and expanded trace format support

The simulator's trace parsing infrastructure has been restructured to introduce abstract base classes (AbstractTraceReader, BinaryTraceReader, TextTraceReader) that standardize how trace files are opened, decompressed, and streamed. This change adds support for a wide variety of new trace formats—including cache2k, Corda, Gradle, AgentX, Mooncake, and many others listed in TraceFormat—allowing users to simulate policies against these specific datasets. Additionally, a new ClairvoyantTraceReader materializes traces to enable efficient look-ahead for optimal policies, and a Rewriter utility is provided to convert traces between different formats for cross-simulator analysis.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser · high confidence

Support for hit/miss penalties in address trace simulation

The simulator now supports trace files that include specific hit and miss penalties for memory accesses. A new \AddressPenaltiesTraceReader\ parses lines containing an access type, an unsigned hexadecimal address, instruction count, hit penalty, and miss penalty, allowing simulations to model latency differences between cache hits and misses more accurately.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/parser/address/penalties · high confidence

Behavioural changes

1 commit (0 fixes) modifying wiki/design

A change to existing behaviour in wiki/design — 1 commit, 2 files.

wiki/design · medium confidence · unverified

3 commits (0 fixes) modifying simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/scarab

A change to existing behaviour in simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/scarab — 3 commits, 3 files.

simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/gradle, simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/scarab · medium confidence · unverified

4 commits (1 fix) modifying simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/address

A change to existing behaviour in simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/address — 4 commits (1 fix), 6 files.

simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/address · medium confidence · unverified

Example projects now auto-provision JDK 25 for the Gradle daemon

The coalescing-bulkloader-reactor, hibernate, resilience-failsafe, and write-behind-rxjava example projects now include generated \gradle-daemon-jvm.properties\ files that configure Gradle's toolchain auto-provisioning to use JDK 25. This ensures that the Gradle daemon in these examples automatically downloads and uses the specified Java version across all supported operating systems (Linux, macOS, Windows, FreeBSD, and generic Unix) without requiring manual JDK installation or configuration by the user.

(repo-wide) · high confidence

Examples now use shared Gradle wrapper configuration

The coalescing-bulkloader-reactor example no longer maintains its own local Gradle wrapper files. Instead, the gradle-wrapper.jar and gradle-wrapper.properties are now symbolic links pointing to the project's central wrapper directory. This change ensures the example uses the same Gradle version and configuration as the rest of the repository, simplifying maintenance and ensuring consistency across all examples.

examples/coalescing-bulkloader-reactor/gradle/wrapper · high confidence

Examples now use shared Gradle wrapper files

The Gradle wrapper configuration for the resilience-failsafe example has been updated to use symbolic links pointing to the project's shared wrapper files (gradle-wrapper.jar and gradle-wrapper.properties) located in the root gradle/wrapper directory. This change ensures the example uses the same Gradle version and wrapper setup as the rest of the project, rather than maintaining a separate, potentially divergent copy.

examples/resilience-failsafe/gradle/wrapper · high confidence

Gradle daemon JVM auto-provisioning configuration updated

The Gradle build system now uses updated configuration files to support automatic provisioning of the JVM for the Gradle daemon. New \gradle-daemon-jvm.properties\ files have been added for both the main project and the plugins subproject, defining download URLs via the Foojay Disco API for various operating systems and architectures. The target JVM version for the daemon has been updated to version 26 in the main project and version 25 in the plugins project, ensuring that the correct JDK is automatically downloaded and used for builds.

gradle · high confidence

The Gradle wrapper configuration files (gradle-wrapper.jar and gradle-wrapper.properties) in the write-behind-rxjava example are now relative symlinks pointing to the project root's gradle/wrapper directory. This change standardizes the wrapper setup across examples, ensuring they share the same Gradle distribution and configuration defined at the top level rather than maintaining separate local copies.

examples/write-behind-rxjava/gradle/wrapper · high confidence

The Hibernate example project now references the shared Gradle wrapper files via symlinks instead of containing its own copies. This ensures the example always uses the same Gradle wrapper version and configuration as the rest of the project, simplifying maintenance and keeping the example consistent with the main build setup.

examples/hibernate/gradle/wrapper · high confidence

JCache copy strategy renamed to Copier with serialization filtering support

The JCache copy strategy interface has been renamed from CopyStrategy to Copier, and the implementation has been refactored to use an AbstractCopier base class that optimizes copying for immutable types and arrays. The JavaSerializationCopier now supports ObjectInputFilter to restrict deserialized classes, addressing security concerns around Java serialization in JCache store-by-value scenarios.

jcache/src/main/java/com/github/benmanes/caffeine/jcache/copy · high confidence

New Gradle build configuration extensions and parallel test support

This change introduces a set of Kotlin extension functions for the Gradle build system to modernize configuration and improve test execution. ConfigurationExtensions.kt defines custom artifact attributes (Usage, Category, Bundling, LibraryElements, VerificationType) to precisely select runtime JARs, JaCoCo coverage data, and Javadoc directories. ProjectExtensions.kt adds helpers for accessing version catalogs, configuring JVM arguments (including GraalVM-specific flags), and resolving Java versions and distributions. TaskExtensions.kt provides utilities for Javadoc options and, notably, enables parallel test execution for JUnit Jupiter and TestNG by setting system properties based on available processors.

gradle/plugins/src/main/kotlin · high confidence

New Gradle lifecycle plugins for IDE integration, testing, and publishing

The build system now includes a set of new Gradle Kotlin DSL plugins in the lifecycle directory to standardize project configuration. The \base.caffeine\ plugin establishes core conventions like versioning and dependency constraints, while \java-library.caffeine\ configures the Java compilation toolchain, Javadoc generation, and reproducible JAR bundling. IDE support is enhanced with \eclipse.caffeine\ for project synchronization and \intellij.caffeine\ for run configurations and import checks. Testing is standardized via \testing.caffeine\, which configures JUnit 5, NullAway, and JVM arguments, and publishing is handled by \publish.caffeine\ for Maven artifacts and Sigstore signing. Finally, \versions.caffeine\ manages dependency update checks.

gradle/plugins/src/main/kotlin/lifecycle · high confidence

Refactored membership filter abstraction and added FastFilter support

The simulator's membership package has been restructured to introduce a new \Membership\ interface and a \FilterType\ enum, which allows users to select between different probabilistic set implementations (Caffeine BloomFilter, FastFilter, and Guava BloomFilter) via configuration. This change also migrates null-safety annotations from the Checker Framework to jspecify and adds \@CheckReturnValue\ to prevent accidental ignoring of return values in the membership API.

simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/membership · high confidence

Fixes

1 commit (1 fix) fixing simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/adapt\_size

A fix in simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/adapt\_size — 1 commit (1 fix), 1 file.

_simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/adapt\size · low confidence · unverified

A new symbolic link named \.agents/skills\ was created, pointing to \../.claude/skills\. This change establishes a reference to the skills directory located in the parent \.claude\ folder, likely to organize or expose agent-related skill definitions within the \.agents\ structure.

.agents · low confidence

Test coverage

Add JCache TCK management test infrastructure; Added Apache Commons Collections compatibility tests for Cache.asMap(); Added Eclipse Collections compatibility tests for Caffeine maps; Added Fray concurrency test suite for cache subsystems; Added Guava compatibility test suite for Caffeine; Added JCStress concurrency tests for cache expiration, weak/soft values, and ring buffer publication; Added JCache configuration test resources; Added JCache configuration tests and test fixtures; Added JCache size and weight limit tests; Added JMH benchmarks for cache performance and JVM internals; Added JSR-166 TCK conformance tests for Caffeine collections; Added Lincheck concurrency tests for cache and internal data structures; Added OSGi integration test for Caffeine-Guava compatibility; Added OSGi integration tests for JCache provider; Added OpenJDK JSR-166 concurrency tests for Caffeine maps; Added OpenJDK collection compatibility tests; Added OpenJDK map compatibility test suite; Added comprehensive test coverage for JCache SPI components; Added comprehensive test coverage for JCache event handling components; Added comprehensive test coverage for cache map views and async operations; Added external concurrency and queue sanity tests; Added module integration tests for Caffeine; Added module integration tests for the Guava adapter; Added regression tests for cache concurrency and expiration issues; Added test coverage for the Guava adapter module; Added test for CountMin64TinyLfu reset size validation; Added test for JCache listener deadlock in ForkJoinPool; Added test for weighted size overflow in greedy-dual policies; Added test harness and reference implementations for read buffer strategies; Added test resources for JCache configuration validation; Added tests for Baleen trace reader behavior; Added tests for Bloom filter membership simulation; Added tests for ClockPro reference accuracy and ClockProSimple warm-up behavior; Added tests for CountMin4 admission sketch reset and capacity behavior; Added tests for JCache Guice integration; Added tests for JCache management MBeans; Added tests for JCache serialization copier and null-safety annotations; Added tests for SNIA and T-SPIN trace readers; Added tests for Synthetic distribution validation; Added tests for WindowTinyLfuPolicy boundary conditions; Added tests for cache simulator parser and policy registry robustness; Added tests for simulator report robustness; Added tests for the Clairvoyant (optimal) cache eviction policy; Added tests for the climbing policy simulator's baseline, resizing, and adaptation logic; Added tests for the indexable cache example; Added unit tests for CacheStats and StatsCounter; Added unit tests for JCache EntryProcessor and EntryProcessorEntry; Expanded JCache integration test coverage; Expanded JMH benchmark suite for cache performance analysis; Expanded test coverage for JCache expiry policies; Migrate test suite to JUnit 5 and add null-safety annotations; Modernized JCache test suite with new fixtures and assertions; New Jazzer fuzz tests for core cache components.

Dependencies

Migrate build infrastructure to Gradle Version Catalogs and Develocity

The project has modernized its build system by migrating to Gradle Version Catalogs (libs.versions.toml) for centralized dependency management, replacing individual version declarations across all modules and examples. The build now uses the Develocity plugin (formerly Gradle Enterprise) for build scans and remote caching, and integrates the nmcp-aggregation plugin to publish all subprojects to Central Portal. Additionally, a new JMH session initialization script has been added to standardize benchmark configurations for the optimize-cache skill.

(dependencies) · high confidence

Upgrade Gradle wrapper to version 9.8.0-rc-2

The project's Gradle wrapper has been updated to use Gradle 9.8.0-rc-2. This change ensures that builds are executed with this specific release candidate version, replacing any previous wrapper configuration. The wrapper properties also include explicit settings for network timeout (10 seconds), retry back-off (5 seconds), and a maximum of 3 retries to handle distribution download failures more robustly.

gradle/wrapper · high confidence

Housekeeping

Added license documentation for cache2k trace files

The simulator now includes a LICENSE.txt file in the cache2k parser resources directory, clarifying that the included trace files (such as orm-busy.trace.xz, web07.trace.xz, etc.) are copyrighted by headissue GmbH and provided under the Creative Commons Attribution 4.0 International Public License.

simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/cache2k · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 66 → 67 (+0.3)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 83 → 87 (+4.2)
  • Architecture 99 → 99 (+0.4)
  • Maturity 64 → 66 (+2.7)
  • Readiness 61 → 63 (+1.8)
  • Security 63 → 63 (-0.3)
  • Domain Modelling 100 → 100 (+0.0)
  • Accessibility 76 (new)

Resolved (105)

  • Change coupling: AsyncCache.java ↔ AsyncCacheLoader.java (caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCache.java)
  • Change coupling: AsyncCacheLoader.java ↔ AsyncLoadingCache.java (caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCacheLoader.java)
  • Change coupling: CacheProxy.java ↔ EventTypeAwareListener.java (jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheProxy.java)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java)
  • Duplicated block (10 lines × 2) (jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheProxy.java)
  • Duplicated block (10 lines × 2) (simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr/ClockProPlusPolicy.java)
  • Duplicated block (10 lines × 2) (simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr/ClockProPlusPolicy.java)
  • Duplicated block (11 lines × 2) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java)
  • Duplicated block (11 lines × 2) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/LocalAsyncCache.java)
  • Duplicated block (11 lines × 2) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/StripedBuffer.java)
  • Duplicated block (11 lines × 2) (simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr/ClockProPlusPolicy.java)
  • Duplicated block (11 lines × 2) (simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr/ClockProPlusPolicy.java)
  • Duplicated block (11 lines × 2) (simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr/FrdPolicy.java)
  • Duplicated block (11 lines × 2) (simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr/HillClimberFrdPolicy.java)
  • Duplicated block (11 lines × 2) (simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr/HillClimberFrdPolicy.java)
  • Duplicated block (11 lines × 2) (simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/sketch/feedback/FeedbackTinyLfuPolicy.java)
  • Duplicated block (11 lines × 3) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/Async.java)
  • Duplicated block (11 lines × 3) (simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/irr/FrdPolicy.java)
  • …and 85 more

New (559)

  • Ambiguous intent in naming. buildAsync with a synchronous CacheLoader returns an AsyncLoadingCache. While technically correct (it wraps the sync loader), the method name buildAsync might imply it requires an AsyncCacheLoader. The existence of buildAsync(loader: AsyncCacheLoader...) further clarifies this, but the naming convention build vs buildAsync is slightly inconsistent with the parameter type's async nature. However, this is a minor design choice rather than a strict inconsistency.
  • BoundedLocalCache.expireAfterWriteEntries (cognitive 16) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java)
  • BoundedLocalCache.onAccess (cognitive 16) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java)
  • BoundedLocalCache.replace (cognitive 17) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java)
  • BoundedLocalCache.replace (cyclomatic 16) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java)
  • BoundedLocalCache.toString (cognitive 16) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java)
  • CacheProxy.get (cognitive 17) (jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheProxy.java)
  • CacheProxy.putAll (cyclomatic 16) (jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheProxy.java)
  • CacheProxy.removeAll (cognitive 17) (jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheProxy.java)
  • ClassTooLong: BoundedLocalCache (caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java)
  • ClassTooLong: CacheProxy (jcache/src/main/java/com/github/benmanes/caffeine/jcache/CacheProxy.java)
  • ClassTooLong: Caffeine (caffeine/src/main/java/com/github/benmanes/caffeine/cache/Caffeine.java)
  • ClassTooLong: LocalAsyncCache (caffeine/src/main/java/com/github/benmanes/caffeine/cache/LocalAsyncCache.java)
  • ClassTooLong: UnboundedLocalCache (caffeine/src/main/java/com/github/benmanes/caffeine/cache/UnboundedLocalCache.java)
  • ClassTooLong: WindowClimber (caffeine/src/main/java/com/github/benmanes/caffeine/cache/WindowClimber.java)
  • DensityClimber.route (cognitive 25) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/WindowClimber.java)
  • DensityClimber.route (cyclomatic 16) (caffeine/src/main/java/com/github/benmanes/caffeine/cache/WindowClimber.java)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Duplicate factory method with different return types in different packages. Caffeine.build() returns a native Caffeine Cache, while CaffeinatedGuava.build() returns a Guava-compatible Cache (likely com.google.common.cache.Cache). This creates confusion about which implementation is being instantiated and returned, especially since the parameter type Caffeine<K, V> is identical.
  • …and 539 more

Changes since last survey

  • 103 commits — 84 feature/other, 19 fixes

By area

  • caffeine/src — 44 commits
  • .claude/skills — 15 commits
  • jcache/src — 15 commits
  • .claude/docs — 11 commits
  • .github/workflows — 5 commits
  • .claude/rules — 4 commits
  • simulator/src — 4 commits
  • (root) — 2 commits
  • gradle/plugins — 2 commits
  • examples/indexable — 1 commit

Notable commits

  • fix: Fix adaptive window issues found by the audit sweep
  • fix: Fix async cache issues found by the audit sweep
  • fix: Fix issues found by the audit sweep
  • fix: Fix jcache defects found by an audit sweep
  • fix: Fix minor issues found by an adversarial audit
  • fix: Fix upcoming warnings from NullAway 0.14.0 (#2003)
  • fix: Fixes for upcoming NullAway warnings (#2015)
  • fix: Resolve warnings in NullAway's JSpecifyExperimental setting (fixes #2004)
  • fix: enable jspecify experimental mode (fixes #2004)
  • fix: fix a refresh spin on a valueless bulk proxy
  • fix: fix issues found by the audit sweep
  • fix: fix issues found by the audit sweep
  • fix: fix jcache audit triage
  • fix: fix map, build, and test issues from the audit sweep
  • fix: fix performance issues and test coverage gaps found by the audit sweep
  • fix: fix simulator issues found by the audit sweep
  • fix: minor jcache fixes after audit sweep
  • fix: only unregister if statistics is enabled, fixes #2009 (#2010)
  • fix: restore coverage lost to recent fixes
  • change: Adapt the window by hit density with goal-audited probes
  • …and 83 more

Architecture

  • Containers 0 added · 0 removed · contexts 7 added · 1 removed · edges 5 added · 0 removed

Added bounded contexts (7)

  • caffeine
  • coalescing-bulkloader-reactor
  • guava
  • hibernate
  • jcache
  • simulator
  • writebehind-rxjava

Removed bounded contexts (1)

  • .

Added dependency edges (5)

  • coalescing-bulkloader-reactor → caffeine
  • guava → caffeine
  • jcache → caffeine
  • jcache → simulator
  • simulator → caffeine

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

ben-manes/caffeine was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 25 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit e4d3dc36454a7c4b451d8b034d3896dbb2314f85 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-f917f263222d.