当前位置: 首页>>代码示例>>PHP>>正文


PHP accelerator_reset函数代码示例

本文整理汇总了PHP中accelerator_reset函数的典型用法代码示例。如果您正苦于以下问题:PHP accelerator_reset函数的具体用法?PHP accelerator_reset怎么用?PHP accelerator_reset使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了accelerator_reset函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: cleanOpcodes

 /**
  * Try to reset any opcode caches we know about
  *
  * @todo make it so developers can extend this somehow
  */
 public static function cleanOpcodes()
 {
     // APC
     if (function_exists('apc_clear_cache') && ini_get('apc.stat') == 0) {
         apc_clear_cache();
     }
     // Wincache
     if (function_exists('wincache_refresh_if_changed')) {
         wincache_refresh_if_changed();
     }
     // Zend
     if (function_exists('accelerator_reset')) {
         accelerator_reset();
     }
     // eAccelerator
     if (function_exists('eaccelerator_clear')) {
         eaccelerator_clear();
     }
     // XCache
     if (function_exists('xcache_clear_cache') && !ini_get('xcache.admin.enable_auth')) {
         $max = xcache_count(XC_TYPE_PHP);
         for ($i = 0; $i < $max; $i++) {
             if (!xcache_clear_cache(XC_TYPE_PHP, $i)) {
                 break;
             }
         }
     }
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:33,代码来源:SugarCache.php

示例2: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____257916564'][13](___575231538(13))) {
         accelerator_reset();
     } elseif ($GLOBALS['____257916564'][14](___575231538(14))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:8,代码来源:update_client.php

示例3: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____626942765'][16](___283096063(16))) {
         accelerator_reset();
     } elseif ($GLOBALS['____626942765'][17](___283096063(17))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:8,代码来源:update_client.php

示例4: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____716757992'][13](___781194072(13))) {
         accelerator_reset();
     } elseif ($GLOBALS['____716757992'][14](___781194072(14))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:supertest223,项目名称:bitrixtest,代码行数:8,代码来源:update_client.php

示例5: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____2058819955'][16](___1032422006(16))) {
         accelerator_reset();
     } elseif ($GLOBALS['____2058819955'][17](___1032422006(17))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:8,代码来源:update_client.php

示例6: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____467353288'][16](___1498308727(16))) {
         accelerator_reset();
     } elseif ($GLOBALS['____467353288'][17](___1498308727(17))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:webgksupport,项目名称:alpina,代码行数:8,代码来源:update_client.php

示例7: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____1513245363'][16](___1595018847(16))) {
         accelerator_reset();
     } elseif ($GLOBALS['____1513245363'][17](___1595018847(17))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:8,代码来源:update_client.php

示例8: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____1595852040'][16](___1664354704(16))) {
         accelerator_reset();
     } elseif ($GLOBALS['____1595852040'][17](___1664354704(17))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:vim84,项目名称:b-markt,代码行数:8,代码来源:update_client.php

示例9: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____686248920'][13](___424308761(13))) {
         accelerator_reset();
     } elseif ($GLOBALS['____686248920'][14](___424308761(14))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:spas-viktor,项目名称:books,代码行数:8,代码来源:update_client.php

示例10: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____780604396'][16](___1088551736(16))) {
         accelerator_reset();
     } elseif ($GLOBALS['____780604396'][17](___1088551736(17))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:rasuldev,项目名称:torino,代码行数:8,代码来源:update_client.php

示例11: bx_accelerator_reset

 function bx_accelerator_reset()
 {
     if ($GLOBALS['____1606645557'][16](___2114809146(16))) {
         accelerator_reset();
     } elseif ($GLOBALS['____1606645557'][17](___2114809146(17))) {
         wincache_refresh_if_changed();
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:8,代码来源:update_client.php

示例12: cleanAccelerator

 protected function cleanAccelerator()
 {
     try {
         echo "Cleaning accelerator... ";
         flush();
         accelerator_reset();
         echo "[OK]" . PHP_EOL . PHP_EOL;
     } catch (Exception $e) {
         die("[ERROR:" . $e->getMessage() . "]" . PHP_EOL);
     }
 }
开发者ID:VIVEKLUCKY1848,项目名称:prestashop-utils,代码行数:11,代码来源:cleanCache.php

示例13: initialize

 /**
  * Initialize the cache properties
  */
 protected static function initialize()
 {
     $apcVersion = phpversion('apc');
     $xcVersion = phpversion('xcache');
     static::$supportedCaches = array('OPcache' => array('active' => extension_loaded('Zend OPcache') && ini_get('opcache.enable') === '1', 'version' => phpversion('Zend OPcache'), 'canReset' => TRUE, 'canInvalidate' => function_exists('opcache_invalidate'), 'error' => FALSE, 'clearCallback' => function ($fileAbsPath) {
         if ($fileAbsPath !== NULL && function_exists('opcache_invalidate')) {
             opcache_invalidate($fileAbsPath);
         } else {
             opcache_reset();
         }
     }), 'APC' => array('active' => extension_loaded('apc') && !extension_loaded('apcu') && ini_get('apc.enabled') === '1', 'version' => $apcVersion, 'canReset' => TRUE, 'canInvalidate' => self::canApcInvalidate(), 'error' => $apcVersion && VersionNumberUtility::convertVersionNumberToInteger($apcVersion) < 3001007, 'clearCallback' => function ($fileAbsPath) {
         if ($fileAbsPath !== NULL && OpcodeCacheUtility::getCanInvalidate('APC')) {
             // This may output a warning like: PHP Warning: apc_delete_file(): Could not stat file
             // This warning isn't true, this means that apc was unable to generate the cache key
             // which depends on the configuration of APC.
             apc_delete_file($fileAbsPath);
         } else {
             apc_clear_cache('opcode');
         }
     }), 'WinCache' => array('active' => extension_loaded('wincache') && ini_get('wincache.ocenabled') === '1', 'version' => phpversion('wincache'), 'canReset' => FALSE, 'canInvalidate' => TRUE, 'error' => FALSE, 'clearCallback' => function ($fileAbsPath) {
         if ($fileAbsPath !== NULL) {
             wincache_refresh_if_changed(array($fileAbsPath));
         } else {
             // No argument means refreshing all.
             wincache_refresh_if_changed();
         }
     }), 'XCache' => array('active' => extension_loaded('xcache'), 'version' => $xcVersion, 'canReset' => TRUE, 'canInvalidate' => FALSE, 'error' => FALSE, 'clearCallback' => $xcVersion && VersionNumberUtility::convertVersionNumberToInteger($xcVersion) < 3000000 ? function ($fileAbsPath) {
         if (!ini_get('xcache.admin.enable_auth')) {
             xcache_clear_cache(XC_TYPE_PHP, 0);
         }
     } : function ($fileAbsPath) {
         if (!ini_get('xcache.admin.enable_auth')) {
             xcache_clear_cache(XC_TYPE_PHP);
         }
     }), 'eAccelerator' => array('active' => extension_loaded('eAccelerator'), 'version' => phpversion('eaccelerator'), 'canReset' => FALSE, 'canInvalidate' => FALSE, 'error' => TRUE, 'clearCallback' => function ($fileAbsPath) {
         eaccelerator_clear();
     }), 'ZendOptimizerPlus' => array('active' => extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable') === '1', 'version' => phpversion('Zend Optimizer+'), 'canReset' => TRUE, 'canInvalidate' => FALSE, 'error' => FALSE, 'clearCallback' => function ($fileAbsPath) {
         accelerator_reset();
     }));
     static::$activeCaches = array();
     // Cache the active ones
     foreach (static::$supportedCaches as $opcodeCache => $properties) {
         if ($properties['active']) {
             static::$activeCaches[$opcodeCache] = $properties;
         }
     }
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:50,代码来源:OpcodeCacheUtility.php

示例14: init

 public function init()
 {
     parent::init();
     // clear the opcache (as of PHP 5.5)
     if (function_exists("opcache_reset")) {
         opcache_reset();
     }
     // clear the APC opcode cache (<= PHP 5.4)
     if (function_exists("apc_clear_cache")) {
         apc_clear_cache();
     }
     // clear the Zend Optimizer cache (Zend Server <= PHP 5.4)
     if (function_exists('accelerator_reset')) {
         return accelerator_reset();
     }
     $this->checkPermission("update");
 }
开发者ID:elavarasann,项目名称:pimcore,代码行数:17,代码来源:IndexController.php

示例15: initialize

 /**
  * Initialize the cache properties
  *
  * @return void
  */
 protected static function initialize()
 {
     $apcVersion = phpversion('apc');
     $xcVersion = phpversion('xcache');
     static::$supportedCaches = array('OPcache' => array('active' => extension_loaded('Zend OPcache') && ini_get('opcache.enable') === '1', 'version' => phpversion('Zend OPcache'), 'canReset' => true, 'canInvalidate' => function_exists('opcache_invalidate'), 'error' => false, 'clearCallback' => function ($fileAbsPath) {
         if ($fileAbsPath !== null && function_exists('opcache_invalidate')) {
             opcache_invalidate($fileAbsPath, true);
         } else {
             opcache_reset();
         }
     }), 'APC' => array('active' => extension_loaded('apc') && !extension_loaded('apcu') && ini_get('apc.enabled') === '1', 'version' => $apcVersion, 'canReset' => true, 'canInvalidate' => self::canApcInvalidate(), 'error' => $apcVersion && version_compare($apcVersion, '3.1.7', '<'), 'clearCallback' => function ($fileAbsPath) {
         if ($fileAbsPath !== null && iMSCP_Utility_OpcodeCache::getCanInvalidate('APC')) {
             // This may output a warning like: PHP Warning: apc_delete_file(): Could not stat file
             // This warning isn't true, this means that apc was unable to generate the cache key
             // which depends on the configuration of APC.
             @apc_delete_file($fileAbsPath);
         } else {
             apc_clear_cache('opcode');
         }
     }), 'XCache' => array('active' => extension_loaded('xcache'), 'version' => $xcVersion, 'canReset' => true, 'canInvalidate' => false, 'error' => false, 'clearCallback' => $xcVersion && version_compare($xcVersion, '3.0.0', '<') ? function () {
         if (!ini_get('xcache.admin.enable_auth')) {
             xcache_clear_cache(XC_TYPE_PHP, 0);
         }
     } : function () {
         if (!ini_get('xcache.admin.enable_auth')) {
             xcache_clear_cache(XC_TYPE_PHP);
         }
     }), 'eAccelerator' => array('active' => extension_loaded('eAccelerator'), 'version' => phpversion('eaccelerator'), 'canReset' => false, 'canInvalidate' => false, 'error' => false, 'clearCallback' => function () {
         eaccelerator_clear();
     }), 'ZendOptimizerPlus' => array('active' => extension_loaded('Zend Optimizer+') && ini_get('zend_optimizerplus.enable') === '1', 'version' => phpversion('Zend Optimizer+'), 'canReset' => true, 'canInvalidate' => false, 'error' => false, 'clearCallback' => function () {
         accelerator_reset();
     }));
     static::$activeCaches = array();
     // Cache the active ones
     foreach (static::$supportedCaches as $opcodeCache => $properties) {
         if ($properties['active']) {
             static::$activeCaches[$opcodeCache] = $properties;
         }
     }
 }
开发者ID:svenjantzen,项目名称:imscp,代码行数:45,代码来源:OpcodeCache.php


注:本文中的accelerator_reset函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。