當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。