Skip to content

docs(cache): say what ShardKeyEnabled changes besides co-location - #179

Merged
cosmin-staicu merged 1 commit into
mainfrom
docs/shard-key-deprecation-accuracy
Sep 11, 2026
Merged

docs(cache): say what ShardKeyEnabled changes besides co-location#179
cosmin-staicu merged 1 commit into
mainfrom
docs/shard-key-deprecation-accuracy

Conversation

@cosmin-staicu

Copy link
Copy Markdown
Member

Follow-up to #178, from Copilot comments that landed on it just before it merged. Docs and one [Obsolete] string — no behaviour change.

"nothing more" was false

The deprecation note said the flag changes which keys co-locate and nothing more, and then contradicted itself two lines later: with the flag on, ShardPrefixRedisKeyStrategy also refuses a key whose braces form no valid tag, where the flag-off path accepts it. That is an observable behaviour difference, not just co-location.

The claim is now about spread rather than exclusivity — "changes which keys co-locate, not how well they spread" — and the refusal is named where it was previously implied. Fixed in the [Obsolete] message, settings.md, appsettings.all.json and the changelog entry.

The brace caveat omitted KeyPrefix

The caveat listed AppShortName, Separator and the differentiator, but settings.md:174 documents RedisCacheOptions.KeyPrefix as "prepended to every Redis key before AppShortName and the cache key segments" — so a brace there is reached before anything the strategy renders. Added to the list.

The #166 entry asserted too much

It said a caller's own tag picks the slot, flatly. True only for a brace-free prefix; qualified in four words rather than restating the mechanics.

Kept deliberately short

#178 ended with these notes much longer, and they were cut back on review as too detailed. This PR fixes accuracy without re-expanding: the net change is a handful of words per site, no worked examples, and no re-listing of Redis's brace arithmetic.

Tests

Unchanged and green — net10.0 1721 pass, net8.0 1700 pass. Clean build at -c Release -warnaserror --no-incremental.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NsPw6MZHPGmpbo6WDuLzF1

The deprecation note claimed the flag changes which keys co-locate and "nothing
more", which its own next sentence contradicted: with the flag on,
ShardPrefixRedisKeyStrategy also refuses a key whose braces form no valid tag,
where the strategy behind the flag-off path accepts it. The claim is now about
spread rather than exclusivity, and the refusal is named where it was implied.

The brace-free-prefix caveat also left out RedisCacheOptions.KeyPrefix, which
settings.md documents as prepended ahead of AppShortName, so braces there are
reached before anything the strategy renders. And the #166 changelog entry
asserted flatly that a caller's own tag picks the slot, which holds only for a
brace-free prefix.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NsPw6MZHPGmpbo6WDuLzF1
Signed-off-by: Cosmin Staicu <cosmin.staicu@uipath.com>
@sonarqubecloud

Copy link
Copy Markdown

@cosmin-staicu
cosmin-staicu merged commit 8524071 into main Sep 11, 2026
10 checks passed
@cosmin-staicu
cosmin-staicu deleted the docs/shard-key-deprecation-accuracy branch September 11, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants