blib/lib/Amon2/Plugin/Web/NoCache.pm untested

filter: Statementstmt 0.0% 0 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 16 CC 1 SCAR 6.9
CC
1
Cov
0%
init
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
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__