protected function getCacheLifetime(ResponseHeaderBag $headers)
    {
        $maxAge = 0;
        if ($headers->hasCacheControlDirective('max-age')) {
            $maxAge = $headers->getCacheControlDirective('max-age');
        }

        return $maxAge;
    }
protected function getCacheLifetime(ResponseHeaderBag $headers)
    {
        $maxAge = 0;
        if ($headers->hasCacheControlDirective('max-age')) {
            $maxAge = $headers->getCacheControlDirective('max-age');
        }

        return $maxAge;
    }
protected function getCacheLifetime ( ResponseHeaderBag $ headers ) { $ maxAge = 0 ; if ( $ headers -> hasCacheControlDirective ( 'max-age' ) ) { $ maxAge = $ headers -> getCacheControlDirective ( 'max-age' ) ; } return $ maxAge ; }
Get the cache lifetime based on the response headers

@param  ResponseHeaderBag $headers
@return integer
Get the cache lifetime based on the response headers