code/libraries/joomlatools/library/http/response/response.php
public function setMaxAge($max_age, $shared_max_age = null)
    {
        $cache_control = $this->getCacheControl();

        $cache_control['max-age'] = (int) $max_age;

        if(!is_null($shared_max_age) && $shared_max_age > $max_age) {
            $cache_control['s-maxage'] = (int) $shared_max_age;
        }

        $this->_headers->set('Cache-Control', $cache_control);

        return $this;
    }
public function setMaxAge($max_age, $shared_max_age = null)
    {
        $cache_control = $this->getCacheControl();

        $cache_control['max-age'] = (int) $max_age;

        if(!is_null($shared_max_age) && $shared_max_age > $max_age) {
            $cache_control['s-maxage'] = (int) $shared_max_age;
        }

        $this->_headers->set('Cache-Control', $cache_control);

        return $this;
    }
public function setMaxAge ( $ max_age , $ shared_max_age = null ) { $ cache_control = $ this -> getCacheControl ( ) ; $ cache_control [ 'max-age' ] = ( int ) $ max_age ; if ( ! is_null ( $ shared_max_age ) && $ shared_max_age > $ max_age ) { $ cache_control [ 's-maxage' ] = ( int ) $ shared_max_age ; } $ this -> _headers -> set ( 'Cache-Control' , $ cache_control ) ; return $ this ; }
Set the max age

This directive specifies the maximum time in seconds that the fetched response is allowed to be reused from
the time of the request. For example, "max-age=60" indicates that the response can be cached and reused for
the next 60 seconds.

@link https://tools.ietf.org/html/rfc2616#section-14.9.3
@param integer $max_age       The number of seconds after which the response should no longer be considered fresh.
@param integer $share_max_age The number of seconds after which the response should no longer be considered fresh by shared caches.
@return KHttpResponse
Set the max age