src/Utils.php
public static function getFreshness(ResponseInterface $response)
    {
        $maxAge = self::getMaxAge($response);
        $age = self::getResponseAge($response);

        return is_int($maxAge) && is_int($age) ? ($maxAge - $age) : null;
    }
public static function getFreshness(ResponseInterface $response)
    {
        $maxAge = self::getMaxAge($response);
        $age = self::getResponseAge($response);

        return is_int($maxAge) && is_int($age) ? ($maxAge - $age) : null;
    }
public static function getFreshness ( ResponseInterface $ response ) { $ maxAge = self :: getMaxAge ( $ response ) ; $ age = self :: getResponseAge ( $ response ) ; return is_int ( $ maxAge ) && is_int ( $ age ) ? ( $ maxAge - $ age ) : null ; }
Get the freshness of a response by returning the difference of the
maximum lifetime of the response and the age of the response.

Freshness values less than 0 mean that the response is no longer fresh
and is ABS(freshness) seconds expired. Freshness values of greater than
zero is the number of seconds until the response is no longer fresh.
A NULL result means that no freshness information is available.

@param ResponseInterface $response Response to get freshness of

@return int|null
Get the freshness of a response by returning the difference of the maximum lifetime of the response and the age of the response .