Skip to content

Commit

Permalink
Merge pull request #8195 from dhensby/pulls/4.2/cache-default
Browse files Browse the repository at this point in the history
FIX Default cache state should be `no-cache`
  • Loading branch information
chillu committed Jun 18, 2018
2 parents a3b1bf8 + 2f1c299 commit 39a86e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Control/Middleware/HTTPCacheControlMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class HTTPCacheControlMiddleware implements HTTPMiddleware, Resettable

const STATE_DISABLED = 'disabled';

const STATE_DEFAULT = 'default';

/**
* Generate response for the given request
*
Expand Down Expand Up @@ -90,6 +92,9 @@ public function process(HTTPRequest $request, callable $delegate)
self::STATE_ENABLED => [
'must-revalidate' => true,
],
self::STATE_DEFAULT => [
'no-cache' => true,
],
];

/**
Expand All @@ -98,7 +103,7 @@ public function process(HTTPRequest $request, callable $delegate)
* @config
* @var string
*/
protected static $defaultState = self::STATE_DISABLED;
protected static $defaultState = self::STATE_DEFAULT;

/**
* Current state
Expand Down

0 comments on commit 39a86e6

Please sign in to comment.