From 51bbc5e37e3d02e9ae3e239ebf168f1861db5476 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Fri, 4 Apr 2025 20:20:47 +0200 Subject: [PATCH] apply some sqlite pragma optimizations --- lib/cache/sqlite-cache-store.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/cache/sqlite-cache-store.js b/lib/cache/sqlite-cache-store.js index e027cff84ea..f1733330dd5 100644 --- a/lib/cache/sqlite-cache-store.js +++ b/lib/cache/sqlite-cache-store.js @@ -115,6 +115,11 @@ module.exports = class SqliteCacheStore { this.#db = new DatabaseSync(opts?.location ?? ':memory:') this.#db.exec(` + PRAGMA journal_mode = WAL; + PRAGMA synchronous = NORMAL; + PRAGMA temp_store = memory; + PRAGMA optimize; + CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION} ( -- Data specific to us id INTEGER PRIMARY KEY AUTOINCREMENT,