mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #8195 from dhensby/pulls/4.2/cache-default
FIX Default cache state should be `no-cache`
This commit is contained in:
commit
39a86e6d92
@ -26,6 +26,8 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
|
|||||||
|
|
||||||
const STATE_DISABLED = 'disabled';
|
const STATE_DISABLED = 'disabled';
|
||||||
|
|
||||||
|
const STATE_DEFAULT = 'default';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate response for the given request
|
* Generate response for the given request
|
||||||
*
|
*
|
||||||
@ -90,6 +92,9 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
|
|||||||
self::STATE_ENABLED => [
|
self::STATE_ENABLED => [
|
||||||
'must-revalidate' => true,
|
'must-revalidate' => true,
|
||||||
],
|
],
|
||||||
|
self::STATE_DEFAULT => [
|
||||||
|
'no-cache' => true,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -98,7 +103,7 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
|
|||||||
* @config
|
* @config
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected static $defaultState = self::STATE_DISABLED;
|
protected static $defaultState = self::STATE_DEFAULT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current state
|
* Current state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user