Skip to content

Commit c8acc81

Browse files
authored
apply some sqlite pragma optimizations (#4147)
1 parent e0058a7 commit c8acc81

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/cache/sqlite-cache-store.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ module.exports = class SqliteCacheStore {
115115
this.#db = new DatabaseSync(opts?.location ?? ':memory:')
116116

117117
this.#db.exec(`
118+
PRAGMA journal_mode = WAL;
119+
PRAGMA synchronous = NORMAL;
120+
PRAGMA temp_store = memory;
121+
PRAGMA optimize;
122+
118123
CREATE TABLE IF NOT EXISTS cacheInterceptorV${VERSION} (
119124
-- Data specific to us
120125
id INTEGER PRIMARY KEY AUTOINCREMENT,

0 commit comments

Comments
 (0)