summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Helper
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-09-20 09:55:28 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-09-20 09:55:28 +0200
commit2788f97f32a8d0eb2ee330f37ebd91b36d087e0f (patch)
treebfd7f75e9b995c2a56f6ed89354c5bf5e935f752 /lib/Travelynx/Helper
parent2316e03da9de2163a1f50d83b393391cb88780b8 (diff)
get_stationinfo_p: cache negative replies
Diffstat (limited to 'lib/Travelynx/Helper')
-rw-r--r--lib/Travelynx/Helper/DBDB.pm2
1 files changed, 2 insertions, 0 deletions
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;
}