feat: implement web cache for persisting and serving fetched content

- Introduced a new `WebCache` module to manage web content caching.
- Added functionality to store fetched content and serve it via a dedicated route.
- Integrated web cache into the search module for improved content retrieval.
- Implemented database migration management with detailed diagnostics for better error handling during startup.
- Updated the SQLite store to utilize the new migration system for enhanced database management.
This commit is contained in:
leookun
2026-08-30 04:29:39 +08:00
parent fd7998e43c
commit 66ac94d5b1
10 changed files with 704 additions and 12 deletions
+5 -4
View File
@@ -19,7 +19,7 @@ use cursor_server::{
use prost::Message;
#[tokio::test]
async fn applied_revision_schema_upgrades_to_checkpoints_without_losing_rows() {
async fn v0_1_5_beta_1_schema_upgrades_to_checkpoints_without_losing_rows() {
use std::borrow::Cow;
use sqlx::{
@@ -42,11 +42,12 @@ async fn applied_revision_schema_upgrades_to_checkpoints_without_losing_rows() {
)
.await
.unwrap();
let previous = Migrator {
migrations: Cow::Owned(ALL_MIGRATIONS.iter().take(5).cloned().collect()),
// v0.1.5-beta.1 shipped migrations 0001 through 0004.
let v0_1_5_beta_1 = Migrator {
migrations: Cow::Owned(ALL_MIGRATIONS.iter().take(4).cloned().collect()),
..Migrator::DEFAULT
};
previous.run(&pool).await.unwrap();
v0_1_5_beta_1.run(&pool).await.unwrap();
sqlx::query(
"INSERT INTO conversations(conversation_id, updated_at_ms)