NEW Add updateHintsCacheKey extension point to fix invalid caching

If a module augments the allowed pagetypes based on external conditions,
the Hints Cache Key will not cover these conditions and may cause
incorrect output. An example of this is Subsites, which allows each
Subsite to have a different set of allowed pagetypes.
This commit is contained in:
Garion Herman 2019-05-31 10:21:07 +12:00
parent 4e70a6bc70
commit c569cec4ea

View File

@ -2272,7 +2272,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
*/
protected function generateHintsCacheKey($memberID)
{
return md5($memberID . '_' . __CLASS__);
$baseKey = $memberID . '_' . __CLASS__;
$this->extend('updateHintsCacheKey', $baseKey);
return md5($baseKey);
}
/**