* SiteMgr: sitewide config to allow proxys and CDNs caching of anonymous requests (Expires and Cache-Control header)

apps can now enable public caching by either setting $GLOBALS[egw_info][flags][nocachecontrol] to "public" (default php.ini session.cache_expire) or a numeric value in seconds, or call egw_session::cache_control()
This commit is contained in:
Ralf Becker
2013-02-19 15:34:19 +00:00
parent 41a2653679
commit 9b88b849f6
2 changed files with 66 additions and 11 deletions

View File

@ -72,17 +72,6 @@ $GLOBALS['egw_info']['server']['mcrypt_enabled'] = {ENABLE_MCRYPT};
*/
$GLOBALS['egw_info']['server']['mcrypt_iv'] = '{MCRYPT_IV}';
if(!isset($GLOBALS['egw_info']['flags']['nocachecontrol']) || !$GLOBALS['egw_info']['flags']['nocachecontrol'])
{
header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0
}
else
{
// allow caching by browser
session_cache_limiter('private_no_expire');
}
$GLOBALS['egw_info']['flags']['page_start_time'] = microtime(true);
define('DEBUG_API', False);