Skip to content

DOC-6616 Prefetch queue use case example#3317

Open
andy-stark-redis wants to merge 13 commits into
mainfrom
DOC-6616-prefetch-cache-use-case
Open

DOC-6616 Prefetch queue use case example#3317
andy-stark-redis wants to merge 13 commits into
mainfrom
DOC-6616-prefetch-cache-use-case

Conversation

@andy-stark-redis
Copy link
Copy Markdown
Contributor

@andy-stark-redis andy-stark-redis commented May 13, 2026

Don't review yet - this is just to get some early feedback from the Bugbot.


Note

Medium Risk
Adds a new use case section plus sizable new runnable demo code (Go and .NET) including background sync and Redis write paths; risk is mostly doc/demo correctness and build/runtime issues rather than production logic.

Overview
Adds a new Prefetch cache use case to /develop/use-cases, describing the pattern (bulk pre-load + ongoing CDC-style sync) and listing per-language guides.

Introduces full runnable reference implementations for Go (go-redis) and .NET (StackExchange.Redis) demos, including a mock primary store emitting change events, a background sync worker with pause/resume for maintenance actions, and cache helpers that bulk-load, apply upserts/deletes, clear via SCAN, and expose TTL/stats.

Updates internal porting/audit checklists and conventions to capture newly-learned pitfalls: guarding empty-field HSET, preserving TTL -2/-1 sentinels (via raw TTL commands where wrappers lose them), locked mutate+emit ordering, and minor source-download checklist tightening.

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

@andy-stark-redis andy-stark-redis self-assigned this May 13, 2026
@andy-stark-redis andy-stark-redis added the clients Client library docs label May 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

DOC-6616

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@andy-stark-redis andy-stark-redis marked this pull request as ready for review May 13, 2026 12:30
Comment thread content/develop/use-cases/prefetch-cache/redis-py/demo_server.py Outdated
Comment thread content/develop/use-cases/prefetch-cache/redis-py/cache.py
Comment thread content/develop/use-cases/prefetch-cache/go/cache.go Outdated
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

Comment thread content/develop/use-cases/prefetch-cache/go/demo_server.go Outdated
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

Comment thread content/develop/use-cases/prefetch-cache/dotnet/Program.cs
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

Comment thread content/develop/use-cases/prefetch-cache/go/sync_worker.go Outdated
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

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 7bd7d08. Configure here.

Comment thread content/develop/use-cases/prefetch-cache/dotnet/Program.cs Outdated
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

@andy-stark-redis andy-stark-redis requested a review from a team May 13, 2026 15:47
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented May 13, 2026

❌ Jit Scanner failed - Our team is investigating

Jit Scanner failed - Our team has been notified and is working to resolve the issue. Please contact support if you have any questions.


💡 Need to bypass this check? Comment @sera bypass to override.

Copy link
Copy Markdown
Collaborator

@dwdougherty dwdougherty left a comment

Choose a reason for hiding this comment

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

Just one minor nitpick; otherwise, LGTM. I only read the Python example, as the others have similar text. I didn't scrutinize the code.

You can:

- Achieve near-100% cache hit ratios for country codes, product categories, translations, configuration, and other reference tables.
- Keep P95 read latency under 1 ms for lookup-heavy request paths at peak traffic.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It wouldn't hurt to define "P95". I'd never seen the term before, so I had to look it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients Client library docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants