File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 13
13
use Http \Message \RequestFactory ;
14
14
use Http \Message \StreamFactory ;
15
15
use Psr \Cache \CacheItemPoolInterface ;
16
- use Http \Client \Common \Plugin \Cache \Generator \VaryGenerator ;
16
+ use Http \Client \Common \Plugin \Cache \Generator \HeaderCacheKeyGenerator ;
17
17
18
18
/**
19
19
* A builder that builds the API client.
@@ -183,7 +183,7 @@ public function addHeaderValue($header, $headerValue)
183
183
public function addCache (CacheItemPoolInterface $ cachePool , array $ config = [])
184
184
{
185
185
if (!isset ($ config ['cache_key_generator ' ])) {
186
- $ config ['cache_key_generator ' ] = new VaryGenerator (['Authorization ' ]);
186
+ $ config ['cache_key_generator ' ] = new HeaderCacheKeyGenerator (['Authorization ' , ' Cookie ' , ' Accept ' ]);
187
187
}
188
188
$ this ->cachePlugin = Plugin \CachePlugin::clientCache ($ cachePool , $ this ->streamFactory , $ config );
189
189
$ this ->httpClientModified = true ;
You can’t perform that action at this time.
0 commit comments