aboutsummaryrefslogtreecommitdiff
path: root/caches/SQLiteCache.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2023-09-24 20:53:07 +0200
committerGravatar GitHub <noreply@github.com> 2023-09-24 20:53:07 +0200
commit857e908929ef26da41646c04804cbd4aa106ec52 (patch)
treec3c13fae4ef0adaa2861a2fe8abf9aad1c8b53ff /caches/SQLiteCache.php
parentf321f000c170c45aadd750bddd25d5074b4e281f (diff)
downloadrss-bridge-857e908929ef26da41646c04804cbd4aa106ec52.tar.gz
rss-bridge-857e908929ef26da41646c04804cbd4aa106ec52.tar.zst
rss-bridge-857e908929ef26da41646c04804cbd4aa106ec52.zip
chore: prepare 2023-09-24 release (#3703)2023-09-24
Diffstat (limited to 'caches/SQLiteCache.php')
-rw-r--r--caches/SQLiteCache.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/caches/SQLiteCache.php b/caches/SQLiteCache.php
index 94f6e289..becedde4 100644
--- a/caches/SQLiteCache.php
+++ b/caches/SQLiteCache.php
@@ -37,10 +37,14 @@ class SQLiteCache implements CacheInterface
$this->db = new \SQLite3($config['file']);
$this->db->enableExceptions(true);
$this->db->exec("CREATE TABLE storage ('key' BLOB PRIMARY KEY, 'value' BLOB, 'updated' INTEGER)");
+ // Consider uncommenting this to add an index on expiration
+ //$this->db->exec('CREATE INDEX idx_storage_updated ON storage (updated)');
}
$this->db->busyTimeout($config['timeout']);
+
// https://www.sqlite.org/pragma.html#pragma_journal_mode
$this->db->exec('PRAGMA journal_mode = wal');
+
// https://www.sqlite.org/pragma.html#pragma_synchronous
$this->db->exec('PRAGMA synchronous = NORMAL');
}