kernel/private/rest/classes/controllers/rest_controller.php
private function getActionTTL()
    {
        $routingInfos = $this->getRouter()->getRoutingInformation();

        // Check if we have TTL settings for this controller/action
        $actionSectionName = $routingInfos->controllerClass . '_' . $routingInfos->action . '_CacheSettings';
        if ( $this->restINI->hasVariable( $actionSectionName, 'CacheTTL' ) )
        {
            return (int)$this->restINI->variable( $actionSectionName, 'CacheTTL' );
        }

        $controllerSectionName = $routingInfos->controllerClass . '_CacheSettings';
        if ( $this->restINI->hasVariable( $controllerSectionName, 'CacheTTL' ) ) // Nothing at controller/action level, check at controller level
        {
            return (int)$this->restINI->variable( $controllerSectionName, 'CacheTTL' );
        }

        return (int)$this->restINI->variable( 'CacheSettings', 'DefaultCacheTTL' );
    }
private function getActionTTL()
    {
        $routingInfos = $this->getRouter()->getRoutingInformation();

        // Check if we have TTL settings for this controller/action
        $actionSectionName = $routingInfos->controllerClass . '_' . $routingInfos->action . '_CacheSettings';
        if ( $this->restINI->hasVariable( $actionSectionName, 'CacheTTL' ) )
        {
            return (int)$this->restINI->variable( $actionSectionName, 'CacheTTL' );
        }

        $controllerSectionName = $routingInfos->controllerClass . '_CacheSettings';
        if ( $this->restINI->hasVariable( $controllerSectionName, 'CacheTTL' ) ) // Nothing at controller/action level, check at controller level
        {
            return (int)$this->restINI->variable( $controllerSectionName, 'CacheTTL' );
        }

        return (int)$this->restINI->variable( 'CacheSettings', 'DefaultCacheTTL' );
    }
private function getActionTTL ( ) { $ routingInfos = $ this -> getRouter ( ) -> getRoutingInformation ( ) ; // Check if we have TTL settings for this controller/action $ actionSectionName = $ routingInfos -> controllerClass . '_' . $ routingInfos -> action . '_CacheSettings' ; if ( $ this -> restINI -> hasVariable ( $ actionSectionName , 'CacheTTL' ) ) { return ( int ) $ this -> restINI -> variable ( $ actionSectionName , 'CacheTTL' ) ; } $ controllerSectionName = $ routingInfos -> controllerClass . '_CacheSettings' ; if ( $ this -> restINI -> hasVariable ( $ controllerSectionName , 'CacheTTL' ) ) // Nothing at controller/action level, check at controller level { return ( int ) $ this -> restINI -> variable ( $ controllerSectionName , 'CacheTTL' ) ; } return ( int ) $ this -> restINI -> variable ( 'CacheSettings' , 'DefaultCacheTTL' ) ; }
Returns cache TTL value for current action as set in rest.ini

Default value will be [CacheSettings].DefaultCacheTTL.
This can be refined by setting a [<controllerClass>_<action>_CacheSettings] section (see comments in rest.ini).

@return int TTL in seconds
Returns cache TTL value for current action as set in rest . ini