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

PHP wincache_ucache_delete函数代码示例

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

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



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

示例1: remove

 public function remove($key)
 {
     if ($key == 'all') {
         return wincache_ucache_clear() ? true : false;
     } else {
         if (wincache_ucache_exists($this->type . '_' . $key)) {
             return wincache_ucache_delete($this->type . '_' . $key) ? true : false;
         }
         return false;
     }
     return false;
 }
开发者ID:blanc0,项目名称:cecilia,代码行数:12,代码来源:WinCache.php


示例2: cs_cache_delete

function cs_cache_delete($name, $ttl = 0)
{
    $token = empty($ttl) ? $name : 'ttl_' . $name;
    if (wincache_ucache_exists($token)) {
        wincache_ucache_delete($token);
    }
}
开发者ID:aberrios,项目名称:WEBTHESGO,代码行数:7,代码来源:wincache.php


示例3: delete

 /**
  * 删除指定key的缓存,若$key===true则表示删除全部
  *
  * @param string $key
  */
 public function delete($key)
 {
     if ($key === true) {
         return $this->delete_all();
     }
     return \wincache_ucache_delete($key);
 }
开发者ID:google2013,项目名称:myqee,代码行数:12,代码来源:wincache.class.php


示例4: delete

 public function delete($key, $options= array()) {
     $deleted = false;
     if (!isset($options['multiple_object_delete']) || empty($options['multiple_object_delete'])) {
         $deleted= wincache_ucache_delete($this->getCacheKey($key));
     }
     return $deleted;
 }
开发者ID:raf3600,项目名称:revolution,代码行数:7,代码来源:xpdowincache.class.php


示例5: delete

 public function delete($key)
 {
     if (function_exists('wincache_ucache_delete')) {
         return wincache_ucache_delete($key);
     } else {
         return getMessage('Cache', 'unsupported', 'Wincache');
     }
 }
开发者ID:Allopa,项目名称:ZN-Framework-Starter,代码行数:8,代码来源:WincacheDriver.php


示例6: remove

 public function remove($key)
 {
     try {
         return wincache_ucache_delete($key);
     } catch (Exception $ex) {
         throw new Exception($ex->getMessage(), $ex->getCode());
     }
 }
开发者ID:ZephyrusDev,项目名称:-Hybrid,代码行数:8,代码来源:WinCacheDriver.php


示例7: delete

 /**
  * (Plug-in replacement for memcache API) Delete data from the persistant cache.
  *
  * @param  mixed			Key name
  */
 function delete($key)
 {
     // Update list of e-objects
     global $ECACHE_OBJECTS;
     unset($ECACHE_OBJECTS[$key]);
     wincache_ucache_set(get_file_base() . 'ECACHE_OBJECTS', $ECACHE_OBJECTS, 0);
     wincache_ucache_delete($key);
 }
开发者ID:erico-deh,项目名称:ocPortal,代码行数:13,代码来源:caches_wincache.php


示例8: delete

 /**
  * Deletes an item out of the cache, or multiple items
  *
  * @param string|array $key
  * @return int
  */
 public function delete($key)
 {
     $delCount = 0;
     foreach (array_filter((array) $key) as $cacheKey) {
         if (wincache_ucache_delete($cacheKey)) {
             ++$delCount;
         }
     }
     return $delCount;
 }
开发者ID:jinshana,项目名称:tangocms,代码行数:16,代码来源:Wincache.php


示例9: clean

 public function clean($group, $mode = null)
 {
     $allinfo = wincache_ucache_info();
     $keys = $allinfo['cache_entries'];
     $secret = $this->_hash;
     foreach ($keys as $key) {
         if (strpos($key['key_name'], $secret . '-cache-' . $group . '-') === 0 xor $mode != 'group') {
             wincache_ucache_delete($key['key_name']);
         }
     }
     return true;
 }
开发者ID:vanie3,项目名称:appland,代码行数:12,代码来源:wincache.php


示例10: clear

 /**
  * Delete all keys from the cache
  *
  * @param bool $check if true will check expiration, otherwise delete all
  * @return bool True if the cache was successfully cleared, false otherwise
  */
 public function clear($check)
 {
     if ($check) {
         return true;
     }
     $info = wincache_ucache_info();
     $cacheKeys = $info['ucache_entries'];
     unset($info);
     foreach ($cacheKeys as $key) {
         wincache_ucache_delete($key['key_name']);
     }
     return true;
 }
开发者ID:coretyson,项目名称:coretyson,代码行数:19,代码来源:WinCacheEngine.php


示例11: filter

 public function filter($prefix)
 {
     $prefixLen = strlen($prefix);
     $info = wincache_ucache_info();
     $keysToDelete = array();
     foreach ($info['ucache_entries'] as $entry) {
         if (empty($entry['is_session']) && 0 === strncmp($entry['key_name'], $prefix, $prefixLen)) {
             $keysToDelete[] = $entry['key_name'];
         }
     }
     if ($keysToDelete) {
         wincache_ucache_delete($keysToDelete);
     }
     return true;
 }
开发者ID:kuria,项目名称:cache,代码行数:15,代码来源:WinCacheDriver.php


示例12: loadClass

 /**
  * {@inheritdoc}
  */
 function loadClass($class)
 {
     // Look if the cache has anything for this class.
     if ($file = wincache_ucache_get($this->prefix . $class)) {
         if (is_file($file)) {
             require $file;
             return;
         }
         wincache_ucache_delete($this->prefix . $class);
     }
     // Resolve cache miss.
     $api = new LoadClassGetFileInjectedApi($class);
     if ($this->finder->apiFindFile($api, $class)) {
         wincache_ucache_set($this->prefix . $class, $api->getFile());
     }
 }
开发者ID:stevebresnick,项目名称:iomedia_stp_d7_core,代码行数:19,代码来源:WinCacheClassLoader.php


示例13: flush

 /**
  * {@inheritDoc}
  */
 public function flush($namespace = null)
 {
     if (!$namespace) {
         return wincache_ucache_clear();
     } else {
         $namespace = implode($this->getNamespaceDelimiter(), (array) $namespace);
         $info = wincache_ucache_info(false);
         // iterate over all entries and delete matching
         foreach ($info['ucache_entries'] as $entry) {
             $key = $entry['key_name'];
             if (0 === strpos($key, $namespace)) {
                 wincache_ucache_delete($key);
             }
         }
     }
     return true;
 }
开发者ID:Nyholm,项目名称:acache,代码行数:20,代码来源:WincacheCache.php


示例14: rm

 /**
  * 删除缓存
  * @access public
  * @param string $name 缓存变量名
  * @return boolean
  */
 public function rm($name)
 {
     return wincache_ucache_delete($this->options['prefix'] . $name);
 }
开发者ID:novnan,项目名称:meiju,代码行数:10,代码来源:Wincache.class.php


示例15: clear

 /**
  *	Delete cache entry
  *	@return bool
  *	@param $key string
  **/
 function clear($key)
 {
     if (!$this->dsn) {
         return;
     }
     $ndx = $this->prefix . '.' . $key;
     $parts = explode('=', $this->dsn, 2);
     switch ($parts[0]) {
         case 'apc':
             return apc_delete($ndx);
         case 'memcache':
             return memcache_delete($this->ref, $ndx);
         case 'wincache':
             return wincache_ucache_delete($ndx);
         case 'xcache':
             return xcache_unset($ndx);
         case 'folder':
             return is_file($file = $parts[1] . $ndx) && @unlink($file);
     }
     return FALSE;
 }
开发者ID:Mumcio,项目名称:bookmark-manager,代码行数:26,代码来源:base.php


示例16: reset

 /**
  *	Clear contents of cache backend
  *	@return bool
  *	@param $suffix string
  *	@param $lifetime int
  **/
 function reset($suffix = NULL, $lifetime = 0)
 {
     if (!$this->dsn) {
         return TRUE;
     }
     $regex = '/' . preg_quote($this->prefix . '.', '/') . '.+?' . preg_quote($suffix, '/') . '/';
     $parts = explode('=', $this->dsn, 2);
     switch ($parts[0]) {
         case 'apc':
             $key = 'info';
         case 'apcu':
             if (empty($key)) {
                 $key = 'key';
             }
             $info = apc_cache_info('users');
             foreach ($info['cache_list'] as $item) {
                 if (preg_match($regex, $item[$key]) && $item['mtime'] + $lifetime < time()) {
                     apc_delete($item[$key]);
                 }
             }
             return TRUE;
         case 'redis':
             $fw = Base::instance();
             $keys = $this->ref->keys($this->prefix . '.*' . $suffix);
             foreach ($keys as $key) {
                 $val = $fw->unserialize($this->ref->get($key));
                 if ($val[1] + $lifetime < time()) {
                     $this->ref->del($key);
                 }
             }
             return TRUE;
         case 'memcache':
             foreach (memcache_get_extended_stats($this->ref, 'slabs') as $slabs) {
                 foreach (array_filter(array_keys($slabs), 'is_numeric') as $id) {
                     foreach (memcache_get_extended_stats($this->ref, 'cachedump', $id) as $data) {
                         if (is_array($data)) {
                             foreach ($data as $key => $val) {
                                 if (preg_match($regex, $key) && $val[1] + $lifetime < time()) {
                                     memcache_delete($this->ref, $key);
                                 }
                             }
                         }
                     }
                 }
             }
             return TRUE;
         case 'wincache':
             $info = wincache_ucache_info();
             foreach ($info['ucache_entries'] as $item) {
                 if (preg_match($regex, $item['key_name']) && $item['use_time'] + $lifetime < time()) {
                     wincache_ucache_delete($item['key_name']);
                 }
             }
             return TRUE;
         case 'xcache':
             return TRUE;
             /* Not supported */
         /* Not supported */
         case 'folder':
             if ($glob = @glob($parts[1] . '*')) {
                 foreach ($glob as $file) {
                     if (preg_match($regex, basename($file)) && filemtime($file) + $lifetime < time()) {
                         @unlink($file);
                     }
                 }
             }
             return TRUE;
     }
     return FALSE;
 }
开发者ID:Podbe,项目名称:Podbe_V4-firtz-node,代码行数:76,代码来源:base.php


示例17: clear

 /**
  * Delete all keys from the cache. This will clear every
  * item in the cache matching the cache config prefix.
  *
  * @param bool $check If true, nothing will be cleared, as entries will
  *   naturally expire in wincache..
  * @return bool True Returns true.
  */
 public function clear($check)
 {
     if ($check) {
         return true;
     }
     $info = wincache_ucache_info();
     $cacheKeys = $info['ucache_entries'];
     unset($info);
     foreach ($cacheKeys as $key) {
         if (strpos($key['key_name'], $this->_config['prefix']) === 0) {
             wincache_ucache_delete($key['key_name']);
         }
     }
     return true;
 }
开发者ID:CakeDC,项目名称:cakephp,代码行数:23,代码来源:WincacheEngine.php


示例18: delete

 /**
  * Remove a value from the WinCache object cache
  *
  * @param $key String: cache key
  * @param $time Int: not used in this implementation
  * @return bool
  */
 public function delete($key, $time = 0)
 {
     wincache_ucache_delete($key);
     return true;
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:12,代码来源:WinCacheBagOStuff.php


示例19: __destruct

 /**
  * Destroy this cell collection
  */
 public function __destruct()
 {
     $cacheList = $this->getCellList();
     foreach ($cacheList as $cellID) {
         wincache_ucache_delete($this->cachePrefix . $cellID . '.cache');
     }
 }
开发者ID:ambient-lounge,项目名称:site,代码行数:10,代码来源:Wincache.php


示例20: hard_delete

 /**
  * Key to delete, deletes .old and primary if exists.
  * @param $key
  * @return bool
  */
 function hard_delete($key)
 {
     $key = $this->get_item_key($key);
     return wincache_ucache_delete($key . '_' . $this->_blog_id);
 }
开发者ID:easinewe,项目名称:Avec2016,代码行数:10,代码来源:Wincache.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wincache_ucache_exists函数代码示例发布时间:2022-05-23
下一篇:
PHP wincache_ucache_dec函数代码示例发布时间: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