Php Proxy Caching
I have an issue on my site with the caching headers being sent by PHP. It’s caching too much.
Currently the headers being sent are:
if ($currentMember->isLoggedIn()) {
$this->cachePermission = ‘private’;
} else {
$this->cachePermission = ‘public’;
}
$this->tru->header->set(‘Pragma’, array(
$this->cachePermission
));
$this->tru->header->set(‘Cache-Control’, array(
$this->cachePermission,
‘no-cache’,
‘max-age=300′,
‘s-maxage=300′,
‘must-revalidate’
));
However, as an administrator I see an Admin CP link when I’m browsing the site… Every single time I visit the site the first page that loads is never the correct one for me. It will never show the Admin CP link, if I’m on the forums it’ll sometimes show that I can’t reply to a thread even though I’m logged in.
I believe that the headers are the issue, perhaps the proxy cache is being loaded when it shouldn’t be.
I need someone who knows what they’re doing who can adjust the headers appropriately. I need to maintain the ability to use back/forward on the browser buttons and for the server to load the cache instead of a fresh new page.


