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


PHP Zend_Cache::clean方法代码示例

本文整理汇总了PHP中Zend_Cache::clean方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Cache::clean方法的具体用法?PHP Zend_Cache::clean怎么用?PHP Zend_Cache::clean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Cache的用法示例。


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

示例1: clearModuleCache

 /**
  * Clears the cache entry for a specific module or all modules.
  *
  * @param string|null $moduleName If null, all cache for all modules is cleared.
  *
  * @return bool
  */
 public function clearModuleCache($moduleName = null)
 {
     if ($this->_moduleCache) {
         if (null !== $moduleName) {
             return $this->_moduleCache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array('module', $moduleName));
         }
         return $this->_moduleCache->clean(Zend_Cache::CLEANING_MODE_ALL);
     }
 }
开发者ID:dmj,项目名称:uni-helmstedt.hab.de,代码行数:16,代码来源:View.php

示例2: clean

 /**
  * Clean all cache entries
  *
  * @return boolean
  * @throws coding_exception
  */
 public function clean()
 {
     if ($this->cache === false) {
         return true;
     }
     try {
         return $this->cache->clean();
     } catch (Zend_Cache_Exception $e) {
         throw new coding_exception('Zend Cache Error: ' . $e->getMessage());
     }
 }
开发者ID:bgao-ca,项目名称:moodle-local_mr,代码行数:17,代码来源:cache.php

示例3: delete

 /**
  * Delete a queue and all of it's messages
  *
  * @param  string  $name queue name
  * @return boolean True
  */
 public function delete($name)
 {
     $queues = $this->_cache->load(self::DEFAULT_QUEUE_KEY);
     if (is_array($queues)) {
         foreach ($queues as $key => &$queue) {
             if ($queue['name'] == $name) {
                 unset($queues[$key]);
                 break;
             }
         }
     }
     // Delete any messages in the queue
     $this->_cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array($name));
     return $this->_cache->save($queues, self::DEFAULT_QUEUE_KEY, array(), 0);
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:21,代码来源:Cache.php

示例4: cleanAllCachesAction

 /**
  * Metodo que faz limpeza do Cache (Memcached ou Filesystem)
  * das duas instancias de cache do MPE: cache_FS e cache_acl
  * 
  * Como chamar via admim:
  * 
  * http://[mpe-dominio]/cache/clean-all-caches
  * 
  * @author esilva
  * 
  * @param Zend_Cache $cache
  */
 public function cleanAllCachesAction(Zend_Cache $cache = null)
 {
     $this->_helper->layout()->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     $this->cache = Zend_Registry::get('cache_FS');
     $this->cache2 = Zend_Registry::get('cache_acl');
     echo "<br>Inserindo conteudo no Cache (Memcached ou Filesystem) <br><br>";
     $this->cache->save('conteudo variavel teste eh este!!', 'teste');
     $testando = $this->cache->load('teste');
     $this->cache2->save('conteudo variavel testeAcl eh este!!', 'testeAcl');
     $testandoAcl = $this->cache2->load('testeAcl');
     sleep(1);
     echo "";
     var_dump('teste_var (cache): ', $testando);
     var_dump('teste_var_acl (cache): ', $testandoAcl);
     echo "<br><BR>LIMPANDO CACHE!!!<br><BR>";
     // clean all records
     $this->cache->clean(Zend_Cache::CLEANING_MODE_ALL);
     $this->cache2->clean(Zend_Cache::CLEANING_MODE_ALL);
     // clean only outdated
     $this->cache->clean(Zend_Cache::CLEANING_MODE_OLD);
     $this->cache2->clean(Zend_Cache::CLEANING_MODE_OLD);
     sleep(2);
     echo "<br> [Verificação da limpeza do cache]<Br><BR>";
     $testando = $this->cache->load('teste');
     $testando2 = $this->cache->load('teste2');
     $testando3 = $this->cache->load('teste3');
     $testandoAcl = $this->cache2->load('testeAcl');
     //recupera do cache
     if ($testando == false) {
         echo "variavel [teste] não mais existe<br>";
         echo "variavel [teste2] não mais existe<br>";
         echo "variavel [teste3] não mais existe<br>";
         echo "variavel [testeAcl] não mais existe<br>";
     } else {
         echo "variavel [teste] existe no cache: ";
         echo "teste: " . $testando . "<br>";
         echo "variavel [teste2] existe no cache: ";
         echo "teste2: " . $testando2 . "<br>";
         echo "variavel [teste3] existe no cache: ";
         echo "teste3: " . $testando3 . "<br>";
         echo "variavel [testeAcl] existe no cache: ";
         echo "testeAcl: " . $testandoAcl . "<br>";
     }
 }
开发者ID:Lazaro-Gallo,项目名称:psmn,代码行数:57,代码来源:CacheController.php

示例5: clean

 /**
  * method to clean all cache tier
  * 
  * @return mixed the value in the cache
  */
 public function clean()
 {
     return $this->cache->clean();
 }
开发者ID:ngchie,项目名称:system,代码行数:9,代码来源:Cache.php

示例6: refreshCache

 /**
  * Refresh Cache
  *
  * Clears all cached information for SimpleDb and refreshes items
  * that will not refresh themselves.
  *
  * @param void
  * @return void
  */
 public function refreshCache()
 {
     $this->_cache->clean(Zend_Cache::CLEANING_MODE_ALL);
     $this->_loadTableNames();
     $this->_tableInfo = array();
 }
开发者ID:jfro,项目名称:php-simpledb,代码行数:15,代码来源:SimpleDb.php


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