Skip to content
Snippets Groups Projects
Commit 44e141cc authored by Christopher Schäpers's avatar Christopher Schäpers
Browse files

Use \OC_Response for cache invalidation

parent 74c92232
No related branches found
No related tags found
No related merge requests found
......@@ -28,11 +28,8 @@ class OC_Core_Avatar_Controller {
$avatar = new \OC_Avatar();
$image = $avatar->get($user, $size);
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
\OC_Response::disableCaching();
\OC_Response::setLastModifiedHeader(gmdate( 'D, d M Y H:i:s' ).' GMT');
if ($image instanceof \OC_Image) {
$image->show();
} elseif ($image === false) {
......@@ -111,11 +108,8 @@ class OC_Core_Avatar_Controller {
}
$image = new \OC_Image($tmpavatar);
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');
\OC_Response::disableCaching();
\OC_Response::setLastModifiedHeader(gmdate( 'D, d M Y H:i:s' ).' GMT');
$image->show();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment