434 |
} |
} |
435 |
} |
} |
436 |
# set request cache control if specified as valid in config |
# set request cache control if specified as valid in config |
437 |
if ( defined $cnf->{_}->{cache_control_request} ) { |
if ( defined $::cnf->{_}->{cache_control_request} ) { |
438 |
if ( $cnf->{_}->{cache_control_request} =~ /^\d+$/ ) { |
$::log->verb(5,"Setting request cache-control to ". |
439 |
|
$::cnf->{_}->{cache_control_request}); |
440 |
|
if ( $::cnf->{_}->{cache_control_request} =~ /^\d+$/ ) { |
441 |
$ua->default_header('Cache-control' => |
$ua->default_header('Cache-control' => |
442 |
"max-age=".$cnf->{_}->{cache_control_request} ); |
"max-age=".$::cnf->{_}->{cache_control_request} ); |
443 |
} else { |
} else { |
444 |
die "Request cache control is invalid (not a number)\n"; |
die "Request cache control is invalid (not a number)\n"; |
445 |
} |
} |