rishabhdaim opened a new pull request, #2807: URL: https://github.com/apache/jackrabbit-oak/pull/2807
## Summary Migrates all remaining Guava cache API usages to Caffeine (`com.github.benmanes.caffeine`) across the Oak codebase, completing the work started under OAK-11300. ## Changes - **oak-core-spi**: `CacheLIRS`, `CacheStats`, `AbstractCacheStats`, `EmpiricalWeigher` — replace Guava `Cache`/`CacheBuilder`/`Weigher`/`CacheStats`; bump `package-info.java` version - **oak-store-document**: `DocumentNodeStore`, `DocumentNodeStoreBuilder`, `NodeDocumentCache`, `NodeCache`, `PersistentCache`, `CachingCommitValueResolver`, `LocalDiffCache`, `MemoryDiffCache`, `TieredDiffCache`, `NodeDocument`, `ForwardingListener`, `EvictionListener` — replace Guava cache imports; adapt `Callable` → `Function`, `reload()` → `asyncReload()` - **oak-segment-tar**: `SegmentCache`, `ReaderCache`, `RecordCache`, `WriterCacheManager`, `PriorityCache`, `CacheWeights`, `RecordCacheStats`, `SegmentCacheStats` — replace Guava cache imports; add `.executor(Runnable::run)` and `cleanUp()` for synchronous eviction - **oak-blob-plugins**: `FileCache`, `CompositeDataStoreCache`, `UploadStagingCache`, `CachingBlobStore`, `AbstractSharedCachingDataStore`, `DataStoreBlobStore` — replace Guava `Cache`/`CacheBuilder`/`CacheLoader`/`AbstractCache`/`Weigher`/`RemovalCause` - **oak-blob**: `BlobIdSet` — replace `CacheBuilder` with `Caffeine` - **oak-blob-cloud**: `S3Backend` — replace `CacheBuilder` with `Caffeine` - **oak-blob-cloud-azure**: `AzureBlobStoreBackend`, `AzureBlobStoreBackendV8` — replace `CacheBuilder` with `Caffeine` - **oak-search**: `ExtractedTextCache` — replace Guava `Cache`/`CacheBuilder`/`Weigher` with Caffeine - **oak-search-elastic**: `ElasticIndexStatistics` — replace `CacheBuilder`/`CacheLoader`/`LoadingCache`/`Ticker`; `reload()` → `asyncReload()` returning `CompletableFuture`; `getUnchecked()` → `get()` - **oak-run-commons**: `DocumentNodeStoreHelper` — replace Guava `Cache` import - **oak-benchmarks**: `PersistentCacheTest` — replace Guava `Cache` import - **oak-core**: `CacheStatsMetricsTest` — adapt to Caffeine `CacheStats.of()` - **pom.xml** (oak-blob, oak-blob-cloud, oak-blob-cloud-azure, oak-search, oak-search-elastic, oak-run-commons, oak-benchmarks) — add Caffeine dependency ## Test Plan - [ ] `mvn test -pl oak-core-spi` — CacheLIRS, CacheStats tests - [ ] `mvn test -pl oak-store-document` — NodeCache, DocumentNodeStore, persistent cache tests - [ ] `mvn test -pl oak-segment-tar` — SegmentCache, PriorityCache tests - [ ] `mvn test -pl oak-blob-plugins` — FileCache, CompositeDataStoreCache tests - [ ] `mvn test -pl oak-search-elastic` — ElasticIndexStatistics tests ## Links - JIRA: https://issues.apache.org/jira/browse/OAK-11946 - Parent: https://issues.apache.org/jira/browse/OAK-11300 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
