library/Garp/Cache/Manager.php
public static function purgeOpcache($messageBag = array()) {
        // This only clears the Opcache on CLI,
        // which is often separate from the HTTP Opcache.
        if (function_exists('opcache_reset')) {
            opcache_reset();
            $messageBag[] = 'OPCache: purged on the CLI';
        }

        if (function_exists('apc_clear_cache')) {
            apc_clear_cache();
            $messageBag[] = 'APC: purged on the CLI';
        }

        // Next, trigger the Opcache clear calls through HTTP.
        $deployConfig = new Garp_Deploy_Config;
        if (!$deployConfig->isConfigured(APPLICATION_ENV)) {
            return $messageBag;
        }

        $hostName = Zend_Registry::get('config')->app->domain;
        foreach (self::_getServerNames() as $serverName) {
            $opcacheResetWithServerName = self::_resetOpcacheHttp($serverName, $hostName);
            if ($opcacheResetWithServerName) {
                $messageBag[] = "OPCache: http purged on `{$serverName}`";
            }
            if (!$opcacheResetWithServerName) {
                $opcacheResetWithHostName = self::_resetOpcacheHttp($hostName, $hostName);
                $messageBag[] = $opcacheResetWithHostName
                    ? "OPCache: http purged on `{$hostName}`"
                    : "OPCache: failed purging OPCache in http context on `{$hostName}`";
            }
        }
        return $messageBag;
    }
public static function purgeOpcache($messageBag = array()) {
        // This only clears the Opcache on CLI,
        // which is often separate from the HTTP Opcache.
        if (function_exists('opcache_reset')) {
            opcache_reset();
            $messageBag[] = 'OPCache: purged on the CLI';
        }

        if (function_exists('apc_clear_cache')) {
            apc_clear_cache();
            $messageBag[] = 'APC: purged on the CLI';
        }

        // Next, trigger the Opcache clear calls through HTTP.
        $deployConfig = new Garp_Deploy_Config;
        if (!$deployConfig->isConfigured(APPLICATION_ENV)) {
            return $messageBag;
        }

        $hostName = Zend_Registry::get('config')->app->domain;
        foreach (self::_getServerNames() as $serverName) {
            $opcacheResetWithServerName = self::_resetOpcacheHttp($serverName, $hostName);
            if ($opcacheResetWithServerName) {
                $messageBag[] = "OPCache: http purged on `{$serverName}`";
            }
            if (!$opcacheResetWithServerName) {
                $opcacheResetWithHostName = self::_resetOpcacheHttp($hostName, $hostName);
                $messageBag[] = $opcacheResetWithHostName
                    ? "OPCache: http purged on `{$hostName}`"
                    : "OPCache: failed purging OPCache in http context on `{$hostName}`";
            }
        }
        return $messageBag;
    }
public static function purgeOpcache ( $ messageBag = array ( ) ) { // This only clears the Opcache on CLI, // which is often separate from the HTTP Opcache. if ( function_exists ( 'opcache_reset' ) ) { opcache_reset ( ) ; $ messageBag [ ] = 'OPCache: purged on the CLI' ; } if ( function_exists ( 'apc_clear_cache' ) ) { apc_clear_cache ( ) ; $ messageBag [ ] = 'APC: purged on the CLI' ; } // Next, trigger the Opcache clear calls through HTTP. $ deployConfig = new Garp_Deploy_Config ; if ( ! $ deployConfig -> isConfigured ( APPLICATION_ENV ) ) { return $ messageBag ; } $ hostName = Zend_Registry :: get ( 'config' ) -> app -> domain ; foreach ( self :: _getServerNames ( ) as $ serverName ) { $ opcacheResetWithServerName = self :: _resetOpcacheHttp ( $ serverName , $ hostName ) ; if ( $ opcacheResetWithServerName ) { $ messageBag [ ] = "OPCache: http purged on `{$serverName}`" ; } if ( ! $ opcacheResetWithServerName ) { $ opcacheResetWithHostName = self :: _resetOpcacheHttp ( $ hostName , $ hostName ) ; $ messageBag [ ] = $ opcacheResetWithHostName ? "OPCache: http purged on `{$hostName}`" : "OPCache: failed purging OPCache in http context on `{$hostName}`" ; } } return $ messageBag ; }
This clears the Opcache, and APC for legacy systems.
This reset can only be done with an http request.

@param Array $messageBag

@return Void
This clears the Opcache and APC for legacy systems . This reset can only be done with an http request .