File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1313use Http \Message \RequestFactory ;
1414use Http \Message \StreamFactory ;
1515use Psr \Cache \CacheItemPoolInterface ;
16- use Http \Client \Common \Plugin \Cache \Generator \VaryGenerator ;
16+ use Http \Client \Common \Plugin \Cache \Generator \HeaderCacheKeyGenerator ;
1717
1818/**
1919 * A builder that builds the API client.
@@ -183,7 +183,7 @@ public function addHeaderValue($header, $headerValue)
183183 public function addCache (CacheItemPoolInterface $ cachePool , array $ config = [])
184184 {
185185 if (!isset ($ config ['cache_key_generator ' ])) {
186- $ config ['cache_key_generator ' ] = new VaryGenerator (['Authorization ' ]);
186+ $ config ['cache_key_generator ' ] = new HeaderCacheKeyGenerator (['Authorization ' , ' Cookie ' , ' Accept ' ]);
187187 }
188188 $ this ->cachePlugin = Plugin \CachePlugin::clientCache ($ cachePool , $ this ->streamFactory , $ config );
189189 $ this ->httpClientModified = true ;
You can’t perform that action at this time.
0 commit comments