Commit 9e612197 authored by Nigel McNie's avatar Nigel McNie
Browse files

Add HTTP caching for the 'no userprofile' image.

parent 243b99a8
...@@ -65,7 +65,13 @@ switch ($type) { ...@@ -65,7 +65,13 @@ switch ($type) {
// We couldn't find an image for this user. Attempt to use the 'no user // We couldn't find an image for this user. Attempt to use the 'no user
// photo' image for the current theme // photo' image for the current theme
//
// We can cache such images
$maxage = 604800;
header('Expires: '. gmdate('D, d M Y H:i:s', time() + $maxage) .' GMT');
header('Cache-Control: max-age=' . $maxage);
header('Pragma: public');
// NOTE: the institutional admin branch allows the theme to be locked // NOTE: the institutional admin branch allows the theme to be locked
// down. This means that $USER->get('theme') should be used here // down. This means that $USER->get('theme') should be used here
// instead, when that branch is merged. And don't forget to change it // instead, when that branch is merged. And don't forget to change it
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment