Cake\Network\Response::sharedMaxAge PHP Method

sharedMaxAge() public method

The max-age is the number of seconds after which the response should no longer be considered a good candidate to be fetched from a shared cache (like in a proxy server). If called with no parameters, this function will return the current max-age value if any
public sharedMaxAge ( integer | null $seconds = null ) : integer | null
$seconds integer | null if null, the method will return the current s-maxage value
return integer | null
    public function sharedMaxAge($seconds = null)
    {
        if ($seconds !== null) {
            $this->_cacheDirectives['s-maxage'] = $seconds;
            $this->_setCacheControl();
        }
        if (isset($this->_cacheDirectives['s-maxage'])) {
            return $this->_cacheDirectives['s-maxage'];
        }
        return null;
    }