mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
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:
parent
4e70a6bc70
commit
c569cec4ea
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user