• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP zend_shm_cache_clear函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: tearDown

 public function tearDown()
 {
     if (function_exists('zend_shm_cache_clear')) {
         zend_shm_cache_clear();
     }
     parent::tearDown();
 }
开发者ID:razvansividra,项目名称:pnlzf2-1,代码行数:7,代码来源:ZendServerShmTest.php


示例2: clear

 /**
  * Clear datas with $uid key
  * @param mixed $uid
  * @return void
  */
 public function clear($uid = null)
 {
     if ($uid) {
         return zend_shm_cache_delete($uid);
     }
     return zend_shm_cache_clear();
 }
开发者ID:cityware,项目名称:city-shared-memory,代码行数:12,代码来源:ZendShmCache.php


示例3: doFlush

 /**
  * {@inheritdoc}
  */
 protected function doFlush()
 {
     $namespace = $this->getNamespace();
     if (empty($namespace)) {
         return zend_shm_cache_clear();
     }
     return zend_shm_cache_clear($namespace);
 }
开发者ID:BusinessCookies,项目名称:CoffeeMachineProject,代码行数:11,代码来源:ZendDataCache.php


示例4: clearByNamespace

 /**
  * Remove items of given namespace
  *
  * @param string $namespace
  * @return bool
  */
 public function clearByNamespace($namespace)
 {
     $namespace = (string) $namespace;
     if ($namespace === '') {
         throw new Exception\InvalidArgumentException('No namespace given');
     }
     return zend_shm_cache_clear($namespace);
 }
开发者ID:ErR163,项目名称:torrentpier,代码行数:14,代码来源:ZendServerShm.php


示例5: zdcClearByNamespace

 /**
  * Clear items of the given namespace from Zend Data SHM Cache
  *
  * @param  string $namespace
  * @return void
  * @throws Exception\RuntimeException
  */
 protected function zdcClearByNamespace($namespace)
 {
     if (!zend_shm_cache_clear($namespace)) {
         throw new Exception\RuntimeException(
             "zend_shm_cache_clear({$namespace}) failed"
         );
     }
 }
开发者ID:necrogami,项目名称:zf2,代码行数:15,代码来源:ZendServerShm.php


示例6: driverClear

 /**
  * @return bool
  */
 protected function driverClear()
 {
     return @zend_shm_cache_clear();
 }
开发者ID:jigoshop,项目名称:Jigoshop2,代码行数:7,代码来源:Driver.php


示例7: clean_cache

/**
 * Empty out the cache in use as best it can
 *
 * It may only remove the files of a certain type (if the $type parameter is given)
 * Type can be user, data or left blank
 *  - user clears out user data
 *  - data clears out system / opcode data
 *  - If no type is specified will perfom a complete cache clearing
 * For cache engines that do not distinguish on types, a full cache flush will be done
 *
 * @param string $type = ''
 */
function clean_cache($type = '')
{
    global $cache_accelerator, $cache_uid, $cache_password, $cache_memcached, $memcached;
    switch ($cache_accelerator) {
        case 'memcached':
            if ((function_exists('memcache_flush') || function_exists('memcached_flush')) && !empty($cache_memcached)) {
                // Not connected yet?
                if (empty($memcached)) {
                    get_memcached_server();
                }
                if (!$memcached) {
                    return;
                }
                // Clear it out, really invalidate whats there
                if (function_exists('memcache_flush')) {
                    memcache_flush($memcached);
                } else {
                    memcached_flush($memcached);
                }
            }
            break;
        case 'eaccelerator':
            if (function_exists('eaccelerator_clear') && function_exists('eaccelerator_clean')) {
                // Clean out the already expired items
                @eaccelerator_clean();
                // Remove all unused scripts and data from shared memory and disk cache,
                // e.g. all data that isn't used in the current requests.
                @eaccelerator_clear();
            }
        case 'mmcache':
            if (function_exists('mmcache_gc')) {
                // Removes all expired keys from shared memory, this is not a complete cache flush :(
                // @todo there is no clear function, should we try to find all of the keys and delete those? with mmcache_rm
                mmcache_gc();
            }
            break;
        case 'apc':
        case 'apcu':
            if (function_exists('apc_clear_cache')) {
                // If passed a type, clear that type out
                if ($type === '' || $type === 'data') {
                    apc_clear_cache('user');
                    apc_clear_cache('system');
                } elseif ($type === 'user') {
                    apc_clear_cache('user');
                }
            }
            break;
        case 'zend':
            if (function_exists('zend_shm_cache_clear')) {
                zend_shm_cache_clear('ELK');
            }
            break;
        case 'xcache':
            if (function_exists('xcache_clear_cache') && function_exists('xcache_count')) {
                // Xcache may need auth credentials, depending on how its been set up
                if (!empty($cache_uid) && !empty($cache_password)) {
                    $_SERVER['PHP_AUTH_USER'] = $cache_uid;
                    $_SERVER['PHP_AUTH_PW'] = $cache_password;
                }
                // Get the counts so we clear each instance
                $pcnt = xcache_count(XC_TYPE_PHP);
                $vcnt = xcache_count(XC_TYPE_VAR);
                // Time to clear the user vars and/or the opcache
                if ($type === '' || $type === 'user') {
                    for ($i = 0; $i < $vcnt; $i++) {
                        xcache_clear_cache(XC_TYPE_VAR, $i);
                    }
                }
                if ($type === '' || $type === 'data') {
                    for ($i = 0; $i < $pcnt; $i++) {
                        xcache_clear_cache(XC_TYPE_PHP, $i);
                    }
                }
            }
            break;
    }
    // To be complete, we also clear out the cache dir so we get any js/css hive files
    if (is_dir(CACHEDIR)) {
        // Remove the cache files in our disk cache directory
        $dh = opendir(CACHEDIR);
        while ($file = readdir($dh)) {
            if ($file != '.' && $file != '..' && $file != 'index.php' && $file != '.htaccess' && (!$type || substr($file, 0, strlen($type)) == $type)) {
                @unlink(CACHEDIR . '/' . $file);
            }
        }
        closedir($dh);
    }
//.........这里部分代码省略.........
开发者ID:KeiroD,项目名称:Elkarte,代码行数:101,代码来源:Cache.subs.php


示例8: clear

 public function clear()
 {
     $ret = @zend_shm_cache_clear($this->namespace);
     return $ret;
 }
开发者ID:chrismcmacken,项目名称:phptools,代码行数:5,代码来源:Shm.php


示例9: flushValues

 /**
  * Deletes all values from cache.
  * This is the implementation of the method declared in the parent class.
  * @return boolean whether the flush operation was successful.
  * @since 1.1.5
  */
 protected function flushValues()
 {
     return zend_shm_cache_clear();
 }
开发者ID:IuriiP,项目名称:yii-tracker,代码行数:10,代码来源:CZendDataCache.php


示例10: clear

 public function clear()
 {
     zend_shm_cache_clear(self::ZEND_NAMESPACE);
 }
开发者ID:liulingfu,项目名称:madserve,代码行数:4,代码来源:ZendSHM.php


示例11: pmxCacheClean

 function pmxCacheClean()
 {
     zend_shm_cache_clear('PMX');
     // clear SMF settings cache
     cache_put_data('modSettings', null, 90);
 }
开发者ID:thunderamur,项目名称:PortaMx-Virgo-2.0-Beta-2,代码行数:6,代码来源:SubsCache.php


示例12: flush

 /**
  * Deletes all values from cache.
  * Be careful of performing this operation if the cache is shared by multiple applications.
  */
 public function flush()
 {
     zend_shm_cache_clear();
 }
开发者ID:hansenmakangiras,项目名称:yiiframework-cms,代码行数:8,代码来源:CZendDataCache.php


示例13: clean

 /**
  * Clean some cache records
  *
  * Available modes are :
  * 'all' (default)  => remove all cache entries ($tags is not used)
  * 'old'            => unsupported
  *
  * @param  string $mode clean mode
  * @param  array  $tags array of tags
  * @throws Zend_Cache_Exception
  * @return boolean true if no problem
  */
 public function clean($mode = Zend_Cache::CLEANING_MODE_ALL, $tags = array())
 {
     switch ($mode) {
         case Zend_Cache::CLEANING_MODE_ALL:
             return zend_shm_cache_clear($this->_options['namespace']);
             break;
         case Zend_Cache::CLEANING_MODE_OLD:
             $this->_log('Glitch_Cache_Backend_ZendShMem::clean() : CLEANING_MODE_OLD is unsupported by the ZendShMem backend');
             break;
         default:
             Zend_Cache::throwException('Invalid mode for clean() method');
             break;
     }
 }
开发者ID:nstapelbroek,项目名称:Glitch_Lib,代码行数:26,代码来源:ZendShMem.php


示例14: clearByNamespace

 /**
  * Remove items of given namespace
  *
  * @param string $namespace
  * @return boolean
  */
 public function clearByNamespace($namespace)
 {
     return zend_shm_cache_clear($namespace);
 }
开发者ID:Baft,项目名称:Zend-Form,代码行数:10,代码来源:ZendServerShm.php


示例15: clear

 /**
  * {@inheritdoc}
  */
 public function clear()
 {
     return zend_shm_cache_clear();
 }
开发者ID:muhammetardayildiz,项目名称:framework,代码行数:7,代码来源:ZendMemory.php


示例16: _resetExternal

 /**
  * @see SugarCacheAbstract::_resetExternal()
  */
 protected function _resetExternal()
 {
     zend_shm_cache_clear();
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:7,代码来源:SugarCacheZend.php


示例17: doFlush

 /**
  * {@inheritdoc}
  */
 protected function doFlush()
 {
     return empty($this->getNamespace()) ? zend_shm_cache_clear() : zend_shm_cache_clear($this->getNamespace());
 }
开发者ID:nresni,项目名称:common,代码行数:7,代码来源:ZendDataCache.php


示例18: _clear

 /**
  * Clear cache
  */
 protected function _clear()
 {
     zend_shm_cache_clear($this->_options['namespace']);
 }
开发者ID:Gradven,项目名称:what3.1.7,代码行数:7,代码来源:ShMem.php


示例19: clear

 public function clear()
 {
     zend_shm_cache_clear("MongoObject");
 }
开发者ID:dintel,项目名称:mongo-object,代码行数:4,代码来源:ZendDataCacheShm.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP zend_shm_cache_delete函数代码示例发布时间:2022-05-23
下一篇:
PHP zend_optimizer_version函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap