- retry_reopen($self, \&ibx_data_once, [ $self, $ibx ]);
+ retry_reopen($self, \&ibx_data_once, $ibx);
+}
+
+sub ibx_cache_load {
+ my ($doc, $cache) = @_;
+ my ($eidx_key) = xap_terms('Q', $doc);
+ return unless defined($eidx_key); # expired
+ $cache->{$eidx_key} = doc2ibx_cache_ent($doc);
+}
+
+sub _nntpd_cache_load { # retry_reopen callback
+ my ($self) = @_;
+ my $opt = { limit => $self->{xdb}->get_doccount * 10, relevance => -1 };
+ my $mset = mset($self, 'type:newsgroup type:inbox', $opt);
+ my $cache = {};
+ for my $it ($mset->items) {
+ ibx_cache_load($it->get_document, $cache);
+ }
+ $cache