Skip to content

Commit 43031b0

Browse files
authored
fix#91: Change clientCache so it doesn't force no-cache & max-age response directives
1 parent 5c591e9 commit 43031b0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/CachePlugin.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,7 @@ public function __construct(CacheItemPoolInterface $pool, StreamFactoryInterface
9595
public static function clientCache(CacheItemPoolInterface $pool, StreamFactoryInterface $streamFactory, array $config = [])
9696
{
9797
// Allow caching of private requests
98-
if (\array_key_exists('respect_response_cache_directives', $config)) {
99-
$config['respect_response_cache_directives'][] = 'no-cache';
100-
$config['respect_response_cache_directives'][] = 'max-age';
101-
$config['respect_response_cache_directives'] = array_unique($config['respect_response_cache_directives']);
102-
} else {
98+
if (!\array_key_exists('respect_response_cache_directives', $config)) {
10399
$config['respect_response_cache_directives'] = ['no-cache', 'max-age'];
104100
}
105101

0 commit comments

Comments
 (0)