/**
* {@inheritdoc}
*/
public function updateMetadata(Response $response, BlockContextInterface $blockContext = null)
{
if ($this->currentTtl === null) {
$this->currentTtl = $response->getTtl();
}
if ($response->isCacheable() !== null && $response->getTtl() < $this->currentTtl) {
$this->currentTtl = $response->getTtl();
}
}