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


PHP wincache_refresh_if_changed函数代码示例

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


在下文中一共展示了wincache_refresh_if_changed函数的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: getAllActive

 /**
  * Returns all supported and active opcaches
  *
  * @return array Array filled with supported and active opcaches
  */
 public function getAllActive()
 {
     $xcVersion = phpversion('xcache');
     $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();
         }
     }), 'WinCache' => array('active' => extension_loaded('wincache') && ini_get('wincache.ocenabled') === '1', 'version' => phpversion('wincache'), 'canReset' => TRUE, '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' => !ini_get('xcache.admin.enable_auth'), 'canInvalidate' => FALSE, 'error' => FALSE, 'clearCallback' => function ($fileAbsPath) {
         if (!ini_get('xcache.admin.enable_auth')) {
             xcache_clear_cache(XC_TYPE_PHP);
         }
     }));
     $activeCaches = array();
     foreach ($supportedCaches as $opcodeCache => $properties) {
         if ($properties['active']) {
             $activeCaches[$opcodeCache] = $properties;
         }
     }
     return $activeCaches;
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:34,代码来源:OpcodeCacheService.php

示例3: initialize

 /**
  * Initialize the ClearCache-Callbacks
  *
  * @return void
  */
 protected static function initialize()
 {
     self::$clearCacheCallbacks = array();
     // Zend OpCache (built in by default since PHP 5.5) - http://php.net/manual/de/book.opcache.php
     if (extension_loaded('Zend OPcache') && ini_get('opcache.enable') === '1') {
         self::$clearCacheCallbacks[] = function ($absolutePathAndFilename) {
             if ($absolutePathAndFilename !== null && function_exists('opcache_invalidate')) {
                 opcache_invalidate($absolutePathAndFilename);
             } else {
                 opcache_reset();
             }
         };
     }
     // WinCache - http://www.php.net/manual/de/book.wincache.php
     if (extension_loaded('wincache') && ini_get('wincache.ocenabled') === '1') {
         self::$clearCacheCallbacks[] = function ($absolutePathAndFilename) {
             if ($absolutePathAndFilename !== null) {
                 wincache_refresh_if_changed(array($absolutePathAndFilename));
             } else {
                 // Refresh everything!
                 wincache_refresh_if_changed();
             }
         };
     }
     // XCache - http://xcache.lighttpd.net/
     // Supported in version >= 3.0.1
     if (extension_loaded('xcache')) {
         self::$clearCacheCallbacks[] = function ($absolutePathAndFilename) {
             // XCache can only be fully cleared.
             if (!ini_get('xcache.admin.enable_auth')) {
                 xcache_clear_cache(XC_TYPE_PHP);
             }
         };
     }
 }
开发者ID:kszyma,项目名称:flow-development-collection,代码行数:40,代码来源:OpcodeCacheHelper.php

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: clearOpcodeCaches

function clearOpcodeCaches()
{
    if (ini_get('wincache.ocenabled')) {
        wincache_refresh_if_changed();
    }
    if (ini_get('apc.enabled') && function_exists('apc_clear_cache')) {
        apc_clear_cache();
    }
}
开发者ID:pierredup,项目名称:patchwork,代码行数:9,代码来源:Utils.php

示例15: 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


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