diff options
author | Max Kostikov <max@kostikov.co> | 2020-12-26 13:24:04 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-12-30 15:37:47 +0100 |
commit | e31a7e5c9d576da9dca9b530a2fc5e68c9df3792 (patch) | |
tree | d953ce62f9673a3777b16a8c9d176ac5c84d35ee | |
parent | e6f0d9887c0a7378562acc89e5cae7489ac49587 (diff) | |
download | volse-hubzilla-e31a7e5c9d576da9dca9b530a2fc5e68c9df3792.tar.gz volse-hubzilla-e31a7e5c9d576da9dca9b530a2fc5e68c9df3792.tar.bz2 volse-hubzilla-e31a7e5c9d576da9dca9b530a2fc5e68c9df3792.zip |
Do not revalidate cached photos
(cherry picked from commit ca051e943f172ce272e7ecc5f77cfcc265d0e158)
-rw-r--r-- | Zotlabs/Module/Photo.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php index c88696578..c94d06884 100644 --- a/Zotlabs/Module/Photo.php +++ b/Zotlabs/Module/Photo.php @@ -35,7 +35,7 @@ class Photo extends \Zotlabs\Web\Controller { call_hooks('cache_mode_hook', $cache_mode); $observer_xchan = get_observer_hash(); - $cachecontrol = ''; + $cachecontrol = ', no-cache'; if(isset($type)) { @@ -102,7 +102,7 @@ class Photo extends \Zotlabs\Web\Controller { $modified = filemtime($default); } - $cachecontrol = ', must-revalidate'; + $cachecontrol .= ', must-revalidate'; } else { @@ -169,6 +169,7 @@ class Photo extends \Zotlabs\Web\Controller { $url = z_root() . '/sslify/' . $filename . '?f=&url=' . urlencode($url); goaway($url); } + $cachecontrol = ''; } } } @@ -271,7 +272,7 @@ class Photo extends \Zotlabs\Web\Controller { // in the event that infrastructure caching is present. $smaxage = intval($maxage/12); - header("Cache-Control: no-cache, s-maxage=" . $smaxage . ", max-age=" . $maxage . $cachecontrol); + header("Cache-Control: s-maxage=" . $smaxage . ", max-age=" . $maxage . $cachecontrol); } |