Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/LaunchDarkly/GuzzleFeatureRequester.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct($baseUri, $sdkKey, $options)
$this->_logger = $options['logger'];
$stack = HandlerStack::create();
if (class_exists('Kevinrob\GuzzleCache\CacheMiddleware')) {
$stack->push(new CacheMiddleware(new PublicCacheStrategy(isset($options['cache']) ? $options['cache'] : null), 'cache'));
$stack->push(new CacheMiddleware(new PublicCacheStrategy(isset($options['cache']) ? $options['cache'] : null)), 'cache');
Copy link
Contributor Author

@localheinz localheinz May 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'cache' value should probably be an argument to HandlerStack::push($middleware, $name) instead of to the constructor of CacheMiddleware, which only accepts a single argument.

That is, as of the moment, the 'cache' value is currently not used.

} elseif (!$this->_loggedCacheNotice) {
$this->_logger->info("GuzzleFeatureRequester is not using an HTTP cache because Kevinrob\GuzzleCache\CacheMiddleware was not installed");
$this->_loggedCacheNotice = true;
Expand Down