diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-01-30 17:44:01 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-01-30 17:44:01 +0100 |
commit | c1fa05429ac4fb5e09dcb5f8a17636ca1066e4f9 (patch) | |
tree | d3ded34f2332196d2f920b9ad6f7dc96f898c08a /lib/DBInfoscreen | |
parent | 03178c5508a7e42366e581b4b42a2cea3a41bf16 (diff) |
Remove session / "save defaults" support due to caching issues3.0.0
nginx cache keys depend on session data, so misbehaving clients
(ignoring the refresh dely and continuously requesting a new departure board)
with renewed session data could not be cached, impacting DBF performance
Diffstat (limited to 'lib/DBInfoscreen')
-rw-r--r-- | lib/DBInfoscreen/Controller/Stationboard.pm | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index 9eb24f3..e40fda3 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -512,8 +512,7 @@ sub handle_request { my $apiver = $self->param('version') // 0; my $callback = $self->param('callback'); my $with_related = !$self->param('no_related'); - my $save_defaults = $self->param('save_defaults') // 0; - my $limit = $self->param('limit') // 0; + my $limit = $self->param('limit') // 0; my @train_types = split( /,/, $self->param('train_types') // q{} ); my %opt = ( cache_hafas => $self->app->cache_hafas, @@ -526,18 +525,6 @@ sub handle_request { ? $Travel::Status::DE::IRIS::VERSION : $Travel::Status::DE::HAFAS::VERSION; - if ($save_defaults) { - $self->session( has_data => 1 ); - $self->session( mode => $template ); - $self->session( hidelowdelay => $hide_low_delay ); - $self->session( hide_opts => $hide_opts ); - $self->session( show_realtime => $show_realtime ); - $self->session( admode => $admode ); - $self->session( dark => $dark_layout ); - $self->session( detailed => $show_details ); - $self->session( no_related => !$with_related ); - } - $self->stash( departures => [] ); $self->stash( title => 'DBF' ); $self->stash( version => $dbf_version ); @@ -574,14 +561,6 @@ sub handle_request { } if ( not $station ) { - if ( $self->session('has_data') ) { - for my $param ( - qw(mode hidelowdelay hide_opts show_realtime admode no_related dark detailed) - ) - { - $self->param( $param => $self->session($param) ); - } - } $self->render( 'landingpage', show_intro => 1 ); return; } |