Skip to content

fix sqlite performance issue - #2591

Merged
Gaudy Blanco (gaudyb) merged 2 commits into
mainfrom
fix-cache
Oct 8, 2026
Merged

Gaudy Blanco (gaudyb) merged 2 commits into
mainfrom
fix-cache

Conversation

@gaudyb

Copy link
Copy Markdown
Contributor

Description

Adds a backward-compatible Cache.get_many() API for efficient bulk cache reads.

Provides a default implementation for custom Cache implementations.
Adds direct implementations for MemoryCache and NoopCache.
Optimizes SQLiteCache to:
Use one thread dispatch and one connection per bulk read.
Deduplicate keys and omit missing entries.
Split large requests into bounded 500-key SQL batches.
Preserve namespace isolation.
Decode values consistently with get().
Safely remove malformed entries only when their payload has not changed.
Adds shared contract tests and SQLite-specific batching, concurrency, cleanup, connection reuse, and dispatch-count tests.
Adds an opt-in benchmark comparing Memory, JSON, and SQLite bulk reads.
Updates cache documentation and release notes.

Checklist

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have updated the documentation (if necessary).
  • I have added appropriate unit tests (if applicable).

@gaudyb
Gaudy Blanco (gaudyb) requested a review from a team as a code owner October 7, 2026 20:10
@gaudyb
Gaudy Blanco (gaudyb) merged commit 00d2952 into main Oct 8, 2026
19 checks passed
@gaudyb
Gaudy Blanco (gaudyb) deleted the fix-cache branch October 8, 2026 15:43
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