Permalink
Browse files

MDL-32628 lib/filelib.php: Set user profile image expires to 1 year

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 4d6206ce6768eaec3f5e80f6fa572fd803059af3
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/filelib.php
View
@@ -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();

0 comments on commit 4d6206c

Please sign in to comment.