diff options
author | kondou <kondou@ts.unde.re> | 2013-09-01 23:57:28 +0400 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-09-01 23:57:28 +0400 |
commit | 44e141cc6adc1ad51a6d293c117b53bea43aff87 (patch) | |
tree | b6d227f8e94c6c4449ce5e60b9953d58ade81694 /core/avatar | |
parent | 74c922328123fe40265e3f4e42a34feff057c0d6 (diff) |
Use \OC_Response for cache invalidation
Diffstat (limited to 'core/avatar')
-rw-r--r-- | core/avatar/controller.php | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/core/avatar/controller.php b/core/avatar/controller.php index 5044f3374cd..96d80d35cc8 100644 --- a/core/avatar/controller.php +++ b/core/avatar/controller.php @@ -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(); } |