ZF\Apigility\Admin\Module::disableOpCache PHP Method

disableOpCache() protected method

Disables opcode caching for opcode caches that allow doing so during runtime; the admin API will not work with opcode caching enabled.
protected disableOpCache ( )
    protected function disableOpCache()
    {
        if (isset($_SERVER['SERVER_SOFTWARE']) && preg_match('/^PHP .*? Development Server$/', $_SERVER['SERVER_SOFTWARE'])) {
            // skip the built-in PHP webserver (OPcache reset is not needed +
            // it crashes the server in PHP 5.4 with ZendOptimizer+)
            return;
        }
        // Disable opcode caches that allow runtime disabling
        if (function_exists('xcache_get')) {
            // XCache; just disable it
            ini_set('xcache.cacher', '0');
            return;
        }
        if (function_exists('wincache_ocache_meminfo')) {
            // WinCache; just disable it
            ini_set('wincache.ocenabled', '0');
            return;
        }
    }