mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIX Allow cache control changes to affect default state
This commit is contained in:
parent
0bd613a3b4
commit
9e829c1607
@ -513,7 +513,7 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
|
||||
public function setMaxAge($age)
|
||||
{
|
||||
// Affect all non-disabled states
|
||||
$applyTo = [self::STATE_ENABLED, self::STATE_PRIVATE, self::STATE_PUBLIC];
|
||||
$applyTo = [self::STATE_ENABLED, self::STATE_PRIVATE, self::STATE_PUBLIC, self::STATE_DEFAULT];
|
||||
$this->setStateDirective($applyTo, 'max-age', $age);
|
||||
return $this;
|
||||
}
|
||||
@ -529,7 +529,7 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
|
||||
public function setSharedMaxAge($age)
|
||||
{
|
||||
// Affect all non-disabled states
|
||||
$applyTo = [self::STATE_ENABLED, self::STATE_PRIVATE, self::STATE_PUBLIC];
|
||||
$applyTo = [self::STATE_ENABLED, self::STATE_PRIVATE, self::STATE_PUBLIC, self::STATE_DEFAULT];
|
||||
$this->setStateDirective($applyTo, 's-maxage', $age);
|
||||
return $this;
|
||||
}
|
||||
@ -543,7 +543,7 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
|
||||
*/
|
||||
public function setMustRevalidate($mustRevalidate = true)
|
||||
{
|
||||
$applyTo = [self::STATE_ENABLED, self::STATE_PRIVATE, self::STATE_PUBLIC];
|
||||
$applyTo = [self::STATE_ENABLED, self::STATE_PRIVATE, self::STATE_PUBLIC, self::STATE_DEFAULT];
|
||||
$this->setStateDirective($applyTo, 'must-revalidate', $mustRevalidate);
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user