yuqi1129 opened a new pull request, #10794: URL: https://github.com/apache/gravitino/pull/10794
## What changes were proposed in this pull request? - Adds `GravitinoCache<K, V>` interface (extends `Closeable`) with `getIfPresent`, `put`, `invalidate`, `invalidateAll`, `invalidateByPrefix`, `size`, `close` - Implements `CaffeineGravitinoCache<K, V>` backed by Caffeine with configurable `maxSize` and `ttlSeconds`; `invalidateByPrefix` does an O(n) key scan (acceptable for rare DDL invalidations) - Implements `NoOpsGravitinoCache<K, V>` for testing (all operations are no-ops) Builds on: #10793 ## Why are the changes needed? A shared cache abstraction allows the auth path caches (`userRoleCache`, `groupRoleCache`, `metadataIdCache`, `ownerRelCache`, `loadedRoles`) to be swapped between real Caffeine caches and no-op caches in tests without changing the call sites. ## Does this PR introduce _any_ user-facing changes? No. ## How was this patch tested? - [ ] `./gradlew :core:test -PskipITs` 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
