Fix: Use cache only if we ask it
This commit is contained in:
parent
55fbbc85a5
commit
2eced65db9
@ -155,16 +155,15 @@ if ($format == 'ical' || $format == 'vcal')
|
|||||||
// Ajout directives pour resoudre bug IE
|
// Ajout directives pour resoudre bug IE
|
||||||
//header('Cache-Control: Public, must-revalidate');
|
//header('Cache-Control: Public, must-revalidate');
|
||||||
//header('Pragma: public');
|
//header('Pragma: public');
|
||||||
|
if ($cachedelay) header('Cache-Control: max-age='.$cachedelay.', private, must-revalidate');
|
||||||
// Google Agenda import tweak
|
else header('Cache-Control: private, must-revalidate');
|
||||||
header('Cache-Control: max-age=7200, private, must-revalidate');
|
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$outputfile=$conf->agenda->dir_temp.'/'.$filename;
|
$outputfile=$conf->agenda->dir_temp.'/'.$filename;
|
||||||
$result=readfile($outputfile);
|
$result=readfile($outputfile);
|
||||||
if (! $result) print 'File '.$outputfile.' was empty.';
|
if (! $result) print 'File '.$outputfile.' was empty.';
|
||||||
|
|
||||||
// header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename));
|
//header("Location: ".DOL_URL_ROOT.'/document.php?modulepart=agenda&file='.urlencode($filename));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user