From 2788f97f32a8d0eb2ee330f37ebd91b36d087e0f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 20 Sep 2020 09:55:28 +0200 Subject: get_stationinfo_p: cache negative replies --- lib/Travelynx/Helper/DBDB.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/Travelynx') diff --git a/lib/Travelynx/Helper/DBDB.pm b/lib/Travelynx/Helper/DBDB.pm index 3f181f6..030fbf6 100644 --- a/lib/Travelynx/Helper/DBDB.pm +++ b/lib/Travelynx/Helper/DBDB.pm @@ -116,6 +116,7 @@ sub get_stationinfo_p { my ($tx) = @_; if ( my $err = $tx->error ) { + $cache->freeze( $url, {} ); $promise->reject("HTTP $err->{code} $err->{message}"); return; } @@ -128,6 +129,7 @@ sub get_stationinfo_p { )->catch( sub { my ($err) = @_; + $cache->freeze( $url, {} ); $promise->reject($err); return; } -- cgit v1.2.3