aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-12-29 11:49:33 +0100
committerMario <mario@mariovavti.com>2020-12-29 11:49:33 +0100
commitb66e19dc43641f6914874f065d20424aa132079e (patch)
treef41825ebd0d2a9fe877bdc2daec4c328bef1f60b /Zotlabs/Module
parentc84e3334bfb18fb90945a17d27b43bcb57ef4a1b (diff)
parentca051e943f172ce272e7ecc5f77cfcc265d0e158 (diff)
downloadvolse-hubzilla-b66e19dc43641f6914874f065d20424aa132079e.tar.gz
volse-hubzilla-b66e19dc43641f6914874f065d20424aa132079e.tar.bz2
volse-hubzilla-b66e19dc43641f6914874f065d20424aa132079e.zip
Merge branch 'photocache' into 'dev'
Do not revalidate cached photos See merge request hubzilla/core!1890
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Photo.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 01edda9ae..814705a85 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);
}