FIX Default cache state should be no-cache

This commit is contained in:
Daniel Hensby 2018-06-18 10:25:56 +01:00 committed by Daniel Hensby
parent f03d5e8d19
commit 2f1c2992f8
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -26,6 +26,8 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
const STATE_DISABLED = 'disabled';
const STATE_DEFAULT = 'default';
/**
* Generate response for the given request
*
@ -90,6 +92,9 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
self::STATE_ENABLED => [
'must-revalidate' => true,
],
self::STATE_DEFAULT => [
'no-cache' => true,
],
];
/**
@ -98,7 +103,7 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable
* @config
* @var string
*/
protected static $defaultState = self::STATE_DISABLED;
protected static $defaultState = self::STATE_DEFAULT;
/**
* Current state