Skip to content

fix(search): include explicit region in cache identity - #28

Merged
dondai1234 merged 1 commit into
dondai1234:masterfrom
robbyczgw-cla:fix/search-region-cache-key
Jul 24, 2026
Merged

fix(search): include explicit region in cache identity#28
dondai1234 merged 1 commit into
dondai1234:masterfrom
robbyczgw-cla:fix/search-region-cache-key

Conversation

@robbyczgw-cla

Copy link
Copy Markdown
Contributor

Summary

Include an explicitly supplied, normalized region in the smart_search cache identity so requests for different regions cannot reuse each other's cached results.

Type of change

  • Bug fix (non-breaking)

Checklist

  • Functional behavior changes; no cosmetic-only change.
  • Regression tests fail on v12.3.0 without this patch.
  • pytest tests/ passes locally: 702 passed, 5 deselected.
  • No new heavy module-level import in server.py.
  • CHANGELOG.md updated under Unreleased.
  • No tool schema or public parameter change.

Notes for review

The explicit region is normalized with strip().lower() for cache identity, so GB-EN and gb-en share an entry while us-en and gb-en do not. When region is omitted, the existing cache-key format is preserved to avoid invalidating unrelated cached searches.

Regression coverage checks distinct regional entries, normalized same-region reuse, and the omitted-region key format.

Fixes #25

@dondai1234
dondai1234 force-pushed the fix/search-region-cache-key branch from e270d5a to e5bedaa Compare July 23, 2026 23:58
@dondai1234
dondai1234 merged commit 6da3238 into dondai1234:master Jul 24, 2026
4 checks passed
dondai1234 added a commit that referenced this pull request Jul 24, 2026
Three community bug fixes by @robbyczgw-cla:
- Focus context isolation (#27): scope smart_fetch request context via decorator
- Region cache identity (#28): explicit region in search cache key
- BYOK pool reconciliation (#29): removed/reordered keys without restart

709 tests pass.
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.

smart_search cache reuses results across explicit regions

2 participants