Fix better control of cache

This commit is contained in:
Laurent Destailleur 2023-05-13 22:33:20 +02:00
parent ef91b55d9c
commit aabfd37458

View File

@ -157,7 +157,9 @@ if (GETPOST("cache", 'alpha')) {
// Add param cache=abcdef
if (empty($dolibarr_nocache)) {
header('Cache-Control: max-age=3600, public, must-revalidate');
header('Pragma: cache'); // This is to avoid having Pragma: no-cache
header('Pragma: cache'); // This is to avoid to have Pragma: no-cache set by proxy or web server
header('Expires: '.gmdate('D, d M Y H:i:s', time() + 3600).' GMT'); // This is to avoid to have Expires set by proxy or web server
//header('Expires: '.strtotime('+1 hour');
} else {
header('Cache-Control: no-cache');
}