Skip to content

fix(db): bound prepared statement cache with LRU eviction (#440) - #1236

Open
harshitethic wants to merge 1 commit into
useconcord:mainfrom
harshitethic:fix/440-bounded-sqlite-statement-lru
Open

harshitethic wants to merge 1 commit into
useconcord:mainfrom
harshitethic:fix/440-bounded-sqlite-statement-lru

Conversation

@harshitethic

Copy link
Copy Markdown
Contributor

Fixes #440. Bound each Db prepared statement cache to 200 SQL statements, refreshing LRU position on access and evicting the oldest statement when at capacity. Database.close still clears cached entries. The regression test runs 400 distinct queries, verifies the cache never exceeds 200, hot entries remain cached, evicted queries still work, and close clears the cache. Local Vitest and API typecheck, ESLint passed after rebuilding workspace core.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bound the prepared-statement cache in Db with an LRU limit

1 participant