diff --git a/src/Strategy/PrivateCacheStrategy.php b/src/Strategy/PrivateCacheStrategy.php index a1f480c4..24cb8ac7 100644 --- a/src/Strategy/PrivateCacheStrategy.php +++ b/src/Strategy/PrivateCacheStrategy.php @@ -251,6 +251,13 @@ public function update(RequestInterface $request, ResponseInterface $response) */ public function delete(RequestInterface $request) { + $cache = $this->storage->fetch($this->getCacheKey($request)); + + if ($cache !== null && !$cache->getVaryHeaders()->isEmpty()) { + $varyHeaders = $cache->getVaryHeaders(); + $this->storage->delete($this->getCacheKey($request, $varyHeaders)); + } return $this->storage->delete($this->getCacheKey($request)); + } }