Skip to content
← All reviews
denoland/deno #36153 · CertainLach · 4mo ago

feat: sqlite web cache api expiration

Needs attention3 findings · openOpen the pull request on GitHub ↗
Panel verdict

The panel surfaced issues that deserve attention before merge.

3
raised by reviewers
3
kept by the panel

Findings

HighArchitectureconfidence 0.90

Missing database schema migration for new column 'last_inserted_at'

The SELECT query now includes the 'last_inserted_at' column from the request_response_list table, but no ALTER TABLE statement is provided in this PR to add the column. This will cause a SQL error when the cache is used with an existing database that lacks the column. A migration is needed, e.g., 'ALTER TABLE request_response_list ADD COLUMN last_inserted_at INTEGER NOT NULL DEFAULT 0'.

HighCorrectnessconfidence 0.80

New query column `last_inserted_at` may not exist in existing databases

The SQL query in match_inner now selects the last_inserted_at column which did not appear in the previous query. The diff does not include a database migration or schema update to add this column. If an existing SQLite cache database (created before this PR) is used, the query will fail with a "no such column" error at runtime, breaking all cache lookups.

MediumCorrectnessconfidence 0.75

Flaky test `cacheMatchExpiresAfterTtl` due to timing dependency

The test puts a response with max-age=4 and then does a second cache.match after a delay(6000). If the first match (immediately after put) takes more than 4 seconds due to system load or scheduling delays, it will already be expired, causing the first assertion to fail. This can lead to intermittent failures in CI.

3 reviewers · deepseek/deepseek-v4-flash · reviewed in 50s · 2 files, +239 −28

Ship the PR.
Skip the noise.

Free on 2 repositories · No credit card · Advisory only—never blocks a merge