public function getTtl(): ?int
    {
        $maxAge = $this->getMaxAge();

        return null !== $maxAge ? $maxAge - $this->getAge() : null;
    }
public function getTtl(): ?int
    {
        $maxAge = $this->getMaxAge();

        return null !== $maxAge ? $maxAge - $this->getAge() : null;
    }
public function getTtl ( ) : ? int { $ maxAge = $ this -> getMaxAge ( ) ; return null !== $ maxAge ? $ maxAge - $ this -> getAge ( ) : null ; }
Returns the response's time-to-live in seconds.

It returns null when no freshness information is present in the response.

When the responses TTL is <= 0, the response may not be served from cache without first
revalidating with the origin.

@final
Returns the response s time - to - live in seconds .