當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Cache::flushAll方法代碼示例

本文整理匯總了PHP中Piwik\Cache::flushAll方法的典型用法代碼示例。如果您正苦於以下問題:PHP Cache::flushAll方法的具體用法?PHP Cache::flushAll怎麽用?PHP Cache::flushAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Piwik\Cache的用法示例。


在下文中一共展示了Cache::flushAll方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

 public function setUp()
 {
     parent::setUp();
     PiwikCache::flushAll();
     Translate::loadAllTranslations();
     $this->api = API::getInstance();
 }
開發者ID:dorelljames,項目名稱:piwik,代碼行數:7,代碼來源:ApiTest.php

示例2: deleteAllCacheOnUpdate

 /**
  * Called on Core install, update, plugin enable/disable
  * Will clear all cache that could be affected by the change in configuration being made
  */
 public static function deleteAllCacheOnUpdate($pluginName = false)
 {
     AssetManager::getInstance()->removeMergedAssets($pluginName);
     View::clearCompiledTemplates();
     TrackerCache::deleteTrackerCache();
     PiwikCache::flushAll();
     self::clearPhpCaches();
 }
開發者ID:FluentDevelopment,項目名稱:piwik,代碼行數:12,代碼來源:Filesystem.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     // make sure templates will be found
     Plugin\Manager::getInstance()->loadPlugin('CustomAlerts');
     Plugin\Manager::getInstance()->loadPlugin('Morpheus');
     if (class_exists('\\Piwik\\Cache\\PluginAwareStaticCache')) {
         \Piwik\Cache\PluginAwareStaticCache::clearAll();
         // TODO remove this one
     } else {
         PiwikCache::flushAll();
     }
     Translate::loadAllTranslations();
     $this->controller = new CustomController();
 }
開發者ID:andrzejewsky,項目名稱:plugin-CustomAlerts,代碼行數:15,代碼來源:ControllerTest.php

示例4: test_flushAll_shouldActuallyFlushAllCaches

 public function test_flushAll_shouldActuallyFlushAllCaches()
 {
     $cache1 = Cache::getTransientCache();
     $cache2 = Cache::getLazyCache();
     $cache3 = Cache::getEagerCache();
     $cache1->save('test1', 'content');
     $cache2->save('test2', 'content');
     $cache3->save('test3', 'content');
     $this->assertTrue($cache1->contains('test1'));
     $this->assertTrue($cache2->contains('test2'));
     $this->assertTrue($cache3->contains('test3'));
     Cache::flushAll();
     $this->assertFalse($cache1->contains('test1'));
     $this->assertFalse($cache2->contains('test2'));
     $this->assertFalse($cache3->contains('test3'));
 }
開發者ID:FluentDevelopment,項目名稱:piwik,代碼行數:16,代碼來源:CacheTest.php

示例5: tearDown

 public function tearDown()
 {
     parent::tearDown();
     Cache::flushAll();
 }
開發者ID:FluentDevelopment,項目名稱:piwik,代碼行數:5,代碼來源:ReferrerSpamFilterTest.php

示例6: testTranslationsUseNumberedPlaceholders

 /**
  * check all english translations do not contain more than one
  *
  * @group Plugins
  * @group numbered
  */
 function testTranslationsUseNumberedPlaceholders()
 {
     Cache::flushAll();
     $translator = StaticContainer::get('Piwik\\Translation\\Translator');
     $translator->reset();
     Translate::loadAllTranslations();
     $translations = $translator->getAllTranslations();
     foreach ($translations as $plugin => $pluginTranslations) {
         foreach ($pluginTranslations as $key => $pluginTranslation) {
             $this->assertLessThanOrEqual(1, substr_count($pluginTranslation, '%s'), sprintf('%s.%s must use numbered placeholders instead of multiple %%s', $plugin, $key));
         }
     }
 }
開發者ID:piwik,項目名稱:piwik,代碼行數:19,代碼來源:LanguagesManagerTest.php


注:本文中的Piwik\Cache::flushAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。