diff options
author | Eric Wong <e@80x24.org> | 2021-01-31 22:28:28 -1000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-01 11:38:22 +0000 |
commit | 781a1c891dbd1853e35047a4052af0829f4bda50 (patch) | |
tree | 280f56b5d8529772f2ecadb8ea8bdbbf16eeb32d /lib/PublicInbox/SharedKV.pm | |
parent | 6a9161d470b8aa2258107a828b69380afc01fdd8 (diff) | |
download | public-inbox-781a1c891dbd1853e35047a4052af0829f4bda50.tar.gz |
These DBs will probably be too small to be worth increasing the cache size of.
Diffstat (limited to 'lib/PublicInbox/SharedKV.pm')
-rw-r--r-- | lib/PublicInbox/SharedKV.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/SharedKV.pm b/lib/PublicInbox/SharedKV.pm index b0588060..d65c3158 100644 --- a/lib/PublicInbox/SharedKV.pm +++ b/lib/PublicInbox/SharedKV.pm @@ -27,7 +27,9 @@ sub dbh { }); my $opt = $self->{opt} // {}; $dbh->do('PRAGMA synchronous = OFF') if !$opt->{fsync}; - $dbh->do('PRAGMA cache_size = '.($opt->{cache_size} || 80000)); + if (my $s = $opt->{cache_size}) { + $dbh->do("PRAGMA cache_size = $s"); + } $dbh->do('PRAGMA journal_mode = '. ($opt->{journal_mode} // 'WAL')); $dbh->do(<<''); |