| 1 | package Amon2::Plugin::Web::NoCache; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | |||
| 5 | sub init { | ||
| 6 | my ($class, $c, $conf) = @_; | ||
| 7 | |||
| 8 | $c->add_trigger( | ||
| 9 | AFTER_DISPATCH => sub { | ||
| 10 | my ($self, $res) = @_; | ||
| 11 | $res->header( 'Pragma' => 'no-cache' ); | ||
| 12 | $res->header( 'Cache-Control' => 'no-cache' ); | ||
| 13 | }, | ||
| 14 | ); | ||
| 15 | } | ||
| 16 | |||
| 17 | 1; | ||
| 18 | __END__ |