CHttpGet.php
public function getMaxAge($default = false)
    {
        $cacheControl = isset($this->response['header']['Cache-Control'])
            ? $this->response['header']['Cache-Control']
            : null;

        $maxAge = null;
        if ($cacheControl) {
            // max-age=2592000
            $part = explode('=', $cacheControl);
            $maxAge = ($part[0] == "max-age")
                ? (int) $part[1]
                : null;
        }

        if ($maxAge) {
            return $maxAge;
        }

        $expire = isset($this->response['header']['Expires'])
            ? strtotime($this->response['header']['Expires'])
            : null;

        return $expire ? $expire : $default;
    }
public function getMaxAge($default = false)
    {
        $cacheControl = isset($this->response['header']['Cache-Control'])
            ? $this->response['header']['Cache-Control']
            : null;

        $maxAge = null;
        if ($cacheControl) {
            // max-age=2592000
            $part = explode('=', $cacheControl);
            $maxAge = ($part[0] == "max-age")
                ? (int) $part[1]
                : null;
        }

        if ($maxAge) {
            return $maxAge;
        }

        $expire = isset($this->response['header']['Expires'])
            ? strtotime($this->response['header']['Expires'])
            : null;

        return $expire ? $expire : $default;
    }
public function getMaxAge ( $ default = false ) { $ cacheControl = isset ( $ this -> response [ 'header' ] [ 'Cache-Control' ] ) ? $ this -> response [ 'header' ] [ 'Cache-Control' ] : null ; $ maxAge = null ; if ( $ cacheControl ) { // max-age=2592000 $ part = explode ( '=' , $ cacheControl ) ; $ maxAge = ( $ part [ 0 ] == "max-age" ) ? ( int ) $ part [ 1 ] : null ; } if ( $ maxAge ) { return $ maxAge ; } $ expire = isset ( $ this -> response [ 'header' ] [ 'Expires' ] ) ? strtotime ( $ this -> response [ 'header' ] [ 'Expires' ] ) : null ; return $ expire ? $ expire : $ default ; }
Get max age of cachable item.

@param mixed $default as default value if date is missing in response
header.

@return int as timestamp or false if not available.
Get max age of cachable item .