As with ExtSearch, MiscSearch lacks a janky cleanup timer of
PublicInbox::Inbox objects, leading to info about
inboxes/newsgroups going stale. Fortunately, we don't use
MiscSearch very heavily, yet.
In the future, we may be able to detect new inboxes without
having to SIGHUP or restart daemons using MiscSearch.
sub mset {
my ($self, $qs, $opt) = @_;
$opt ||= {};
+ reopen($self);
my $qp = $self->{qp} //= mi_qp_new($self);
$qs = 'type:inbox' if $qs eq '';
my $qr = $qp->parse_query($qs, $PublicInbox::Search::QP_FLAGS);
retry_reopen($self, \&_nntpd_cache_load);
}
+no warnings 'once';
+*reopen = \&PublicInbox::Search::reopen;
+
1;
sub response {
my ($class, $ctx) = @_;
bless $ctx, $class;
+ if (my $ALL = $ctx->{www}->{pi_cfg}->ALL) {
+ $ALL->misc->reopen;
+ }
my $re = $ctx->url_regexp or return $ctx->psgi_triple;
my $iter = PublicInbox::ConfigIter->new($ctx->{www}->{pi_cfg},
\&list_match_i, $re, $ctx);