Adding support for the broadcast mode - #4539
Open
vrubal wants to merge 1 commit into
Open
Conversation
|
Hi, I’m Jit, a friendly security platform designed to help developers build secure applications from day zero with an MVS (Minimal viable security) mindset. In case there are security findings, they will be communicated to you as a comment inside the PR. Hope you’ll enjoy using Jit. Questions? Comments? Want to learn more? Get in touch with us. |
Contributor
|
hey @vrubal ,, This is actually one of those standing in our TODO list with no concrete timeline as of now,,, so thank you 🕺 for taking the time for this PR. This will be a part of a bigger effort around CSC, so we need to evaluate this in that sense. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Medium Risk
Changes how invalidations are scoped (prefix-based broadcast vs per-connection tracking), which can cause stale cache entries if misconfigured; defaults preserve prior non-BCAST behavior.
Overview
Adds Redis
CLIENT TRACKINGBCAST mode to client-side caching so invalidations can follow prefix filters instead of only keys this connection has read.Configuration flows through
CacheConfig(bcast(),prefixes(...),noloop()), theCacheAPI (isBroadcastMode,getPrefixes,isNoLoop),AbstractCache/DefaultCache, andCacheFactory(including optional constructors on custom cache types).CacheConnectionnow builds tracking arguments dynamically (TRACKING ON, optionalBCAST+PREFIX, optionalNOLOOP) instead of a fixedTRACKING ON.Tests cover config/factory wiring (
BroadcastTrackingArgsTest) and Redis 7.4+ behavior: prefixed keys invalidate on external writes; non-prefixed keys do not when prefixes are set (BroadcastTrackingIntegrationTest).Reviewed by Cursor Bugbot for commit c04462e. Bugbot is set up for automated code reviews on this repo. Configure here.