diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-09-20 09:55:28 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-09-20 09:55:28 +0200 |
commit | 2788f97f32a8d0eb2ee330f37ebd91b36d087e0f (patch) | |
tree | bfd7f75e9b995c2a56f6ed89354c5bf5e935f752 | |
parent | 2316e03da9de2163a1f50d83b393391cb88780b8 (diff) |
get_stationinfo_p: cache negative replies
-rw-r--r-- | lib/Travelynx/Helper/DBDB.pm | 2 |
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; } |