Skip to content

Add SecondaryCache support to Java API#14379

Open
mike-evolved wants to merge 5 commits intofacebook:mainfrom
evolvedbinary:eb/feature/secondary-cache-java
Open

Add SecondaryCache support to Java API#14379
mike-evolved wants to merge 5 commits intofacebook:mainfrom
evolvedbinary:eb/feature/secondary-cache-java

Conversation

@mike-evolved
Copy link

Changes:

  • Add SecondaryCache abstract class with CompressedSecondaryCache implementation
  • Add JNI bindings for CompressedSecondaryCacheOptions
  • Extend LRUCache constructor to accept optional SecondaryCache
  • Add comprehensive test suite (5 tests covering creation, integration, and large datasets)
  • Update build configs (src.mk, java/Makefile, java/CMakeLists.txt)

Usage example:

try (SecondaryCache secondaryCache = SecondaryCache.newCompressedSecondaryCache(256 * 1024 * 1024);
     LRUCache primaryCache = new LRUCache(64 * 1024 * 1024, -1, false, 0.5, 0.0, secondaryCache)) {
  // Use cache with automatic promotion/demotion between tiers
}

@meta-cla meta-cla bot added the CLA Signed label Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant