Skip to content

feat(csc): add command key extraction and caching logic#3773

Open
ofekshenawa wants to merge 3 commits intoadd-local-cachefrom
command-key-extraction-and-caching-logic
Open

feat(csc): add command key extraction and caching logic#3773
ofekshenawa wants to merge 3 commits intoadd-local-cachefrom
command-key-extraction-and-caching-logic

Conversation

@ofekshenawa
Copy link
Copy Markdown
Collaborator

@ofekshenawa ofekshenawa commented Apr 11, 2026

Note

Low Risk
Additive, currently-unused helper logic plus unit tests; main risk is future caching correctness if key extraction misses edge-case command argument layouts.

Overview
Adds initial client-side caching (CSC) command utilities: an allow-list of cacheable read-only commands, isCacheable gating on both allow-list membership and presence of keys, and buildCacheKey which generates length-prefixed cache keys to avoid argument-collision issues.

Also introduces extractRedisKeys to derive the Redis key(s) affected by supported commands (including multi-key, numkeys-style, JSON.MGET, and XREAD layouts), plus comprehensive unit tests covering cacheability decisions, cache-key determinism/collision safety, and key extraction edge cases.

Reviewed by Cursor Bugbot for commit 50fa024. Bugbot is set up for automated code reviews on this repo. Configure here.

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Apr 11, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Comment thread csc_commands.go Outdated
Comment thread csc_commands.go Outdated
@ofekshenawa ofekshenawa force-pushed the command-key-extraction-and-caching-logic branch from 46a7293 to 6f9063c Compare April 11, 2026 08:39
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 62bfb07. Configure here.

Comment thread csc_commands.go Outdated
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