Skip to content

Commit

Permalink
Minor styling changes
Browse files Browse the repository at this point in the history
  • Loading branch information
drdrew42 authored Jan 24, 2022
1 parent 21d0dab commit d796029
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/RenderApp.pm
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,14 @@ sub startup {
if (my $STATIC_EXPIRES = $self->config('STATIC_EXPIRES')) {
$STATIC_EXPIRES = int( $STATIC_EXPIRES );
my $cache_control_setting = "max-age=$STATIC_EXPIRES";
my $no_cache_setting = "max-age=1, no-cache";
my $no_cache_setting = 'max-age=1, no-cache';
$self->hook(after_dispatch => sub {
my $c = shift;

# Only process if file requested is under webwork2_files
unless ( $c->req->url->path =~ '^/webwork2_files' ) {
return;
}
return unless ($c->req->url->path =~ '^/webwork2_files/');

if ( $c->req->url->path =~ '/tmp/renderer' ) {
if ($c->req->url->path =~ '/tmp/renderer') {
# Treat problem generated files as already expired.
# They should not be cached.
$c->res->headers->cache_control( $no_cache_setting );
Expand Down

0 comments on commit d796029

Please sign in to comment.