From: Dirk Koopman Date: Mon, 15 Nov 2021 10:20:20 +0000 (+0000) Subject: don't fork sh/dx on simple query X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=743a03b3b060fbff8579503647a01722fb634cb1;p=spider.git don't fork sh/dx on simple query If the query does not contain an "expression" (or even just a callsign and is garanteed to be satified by the cache - if it is enabled - then do not fork / run as a sub command. So 'sh/dx', 'sh/mydx' with or without a count will be run from the cache - if it is enabled. --- diff --git a/cmd/show/dx.pl b/cmd/show/dx.pl index 7e4d3a35..bad8ffde 100644 --- a/cmd/show/dx.pl +++ b/cmd/show/dx.pl @@ -162,7 +162,7 @@ sub handle # now do the search - if ($self->{_nospawn}) { + if ($self->{_nospawn} || ($Spot::spotcachedays && !$expr && $from == 0 && $fromday == 0 && $today == 0)) { my @res = Spot::search($expr, $fromday, $today, $from, $to, $user, $dofilter, $self); my $ref; my @dx;