Skip to content

Commit

Permalink
Merge pull request #89 from deains/addToCache-static-call
Browse files Browse the repository at this point in the history
Fix calls to static method addToCache to allow subclasses to override it
  • Loading branch information
Kevinrob authored Aug 17, 2017
2 parents f63560f + 63cc5e5 commit 6952064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CacheMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function (ResponseInterface $response) use ($request, $cacheEntry) {
$response = $response->withHeader(self::HEADER_CACHE_INFO, self::HEADER_CACHE_MISS);
}

return self::addToCache($this->cacheStorage, $request, $response, $update);
return static::addToCache($this->cacheStorage, $request, $response, $update);
},
function ($reason) use ($cacheEntry) {
if ($reason instanceof TransferException) {
Expand Down Expand Up @@ -300,7 +300,7 @@ protected function addReValidationRequest(
$update = true;
}

self::addToCache($cacheStorage, $request, $response, $update);
static::addToCache($cacheStorage, $request, $response, $update);
});

return true;
Expand Down

0 comments on commit 6952064

Please sign in to comment.