add some caching headers

This commit is contained in:
Evan Prodromou 2010-08-31 00:33:56 -04:00
parent 0c5ca46ba3
commit c8a69f433c

View File

@ -1004,9 +1004,29 @@ class Action extends HTMLOutputter // lawsuit
}
}
}
if ($this->isCacheable()) {
header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' );
header( "Cache-Control: private, must-revalidate, max-age=0" );
}
}
}
/**
* Is this action cacheable?
*
* If the action returns a last-modified
*
* @param array $argarray is ignored since it's now passed in in prepare()
*
* @return boolean is read only action?
*/
function isCacheable()
{
return true;
}
/**
* Has etag? (private)
*