From f0731b9b653640afd8078aed994814b3049f230a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 25 Feb 2021 05:37:18 +0600 Subject: lei q: auto-memoize remote messages into lei/store This lets users avoid network traffic on subsequent searches at the expense of local disk space. --no-import-remote may be specified to reverse this trade-off for users with little storage. --- lib/PublicInbox/LeiQuery.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/PublicInbox/LeiQuery.pm') diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm index 743fa3f7..b57d1cc5 100644 --- a/lib/PublicInbox/LeiQuery.pm +++ b/lib/PublicInbox/LeiQuery.pm @@ -51,6 +51,7 @@ sub lei_q { # we'll allow "--only $LOCATION --local" my $sto = $self->_lei_store(1); my $lse = $sto->search; + $sto->write_prepare($self) if $opt->{'import-remote'} //= 1; if ($opt->{'local'} //= scalar(@only) ? 0 : 1) { $lxs->prepare_external($lse); } -- cgit v1.2.3-24-ge0c7