Rishabh Daim created OAK-12162:
----------------------------------

             Summary: Final cleanup — remove CacheLIRS, LirsCacheAdapter, 
decouple AbstractCacheStats from Guava
                 Key: OAK-12162
                 URL: https://issues.apache.org/jira/browse/OAK-12162
             Project: Jackrabbit Oak
          Issue Type: Sub-task
            Reporter: Rishabh Daim
            Assignee: Rishabh Daim


Complete the migration by removing all transitional scaffolding and making 
Caffeine the sole cache implementation. AbstractCacheStats is decoupled from 
Guava shim types.

  Changes:
  - AbstractCacheStats — change getCurrentStats() return type from Guava shim 
CacheStats to OakCacheStats; rewrite lastSnapshot field and stats() method to 
use OakCacheStats arithmetic
  - CacheStats — update getCurrentStats() to return OakCacheStats; mark 
Guava-based constructor @Deprecated(forRemoval = true)
  - OakCacheStatsAdapter — update getCurrentStats() to return OakCacheStats 
directly (drop Guava conversion bridge)
  - RecordCacheStats, SegmentCache.Stats, SegmentCacheStats — update 
getCurrentStats() to return OakCacheStats directly (drop Guava conversion 
bridges added in TASK-11/12)
  - Remove LirsCacheAdapter entirely
  - Remove CacheLIRS (or mark @Deprecated(forRemoval = true) — outright removal 
acceptable since it was @Internal)
  - Remove oak.cache.type toggle from OakCacheBuilder; remove the lirs code 
path; Caffeine is the sole implementation
  - Grep to confirm no module outside oak-core-spi still imports 
com.github.benmanes.caffeine.cache or org.apache.jackrabbit.guava.common.cache
  - Remove any Guava cache shim re-exports if still present

  Acceptance criteria:
  - mvn clean install passes (full test suite)
  - AbstractCacheStats.getCurrentStats() returns OakCacheStats; no Guava types 
remain in AbstractCacheStats or its subclasses
  - No CacheLIRS or LirsCacheAdapter classes remain in oak-core-spi
  - OakCacheBuilder has no lirs code path — Caffeine is the sole implementation
  - OSGi integration tests pass



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to