Skip to content

Commit

Permalink
MDL-32628 lib/filelib.php: Set user profile image expires to 1 year
Browse files Browse the repository at this point in the history
This is to reduce the performance impact of user profile images
requests. Pictures are now referenced by a revision counter so
any changes in picture will not be badly cached any longer.
  • Loading branch information
danpoltawski committed May 4, 2012
1 parent 0dda790 commit 4d6206c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/filelib.php
Expand Up @@ -3441,7 +3441,7 @@ function file_pluginfile($relativepath, $forcedownload, $preview = null) {
}
}

send_stored_file($file, 60*60*24*7, 0, false, array('preview' => $preview)); // enable long caching, there are many images on each page
send_stored_file($file, 60*60*24*365, 0, false, array('preview' => $preview)); // enable long caching, there are many images on each page

} else if ($filearea === 'private' and $context->contextlevel == CONTEXT_USER) {
require_login();
Expand Down

0 comments on commit 4d6206c

Please sign in to comment.