当前位置: 首页>>代码示例>>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;未经允许,请勿转载。