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


PHP Cache::deleteTrackerCache方法代码示例

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


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

示例1: 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();
     Cache::deleteTrackerCache();
     self::clearPhpCaches();
 }
开发者ID:josl,项目名称:CGE-File-Sharing,代码行数:11,代码来源:Filesystem.php

示例2: setUp

 public function setUp()
 {
     parent::setUp();
     Fixture::createWebsite('2014-01-01 00:00:00');
     Fixture::createWebsite('2014-01-01 00:00:00');
     Cache::deleteTrackerCache();
     $this->request = $this->buildRequest(array('idsite' => '1'));
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:8,代码来源:RequestTest.php

示例3: setUp

 public function setUp()
 {
     parent::setUp();
     Fixture::createWebsite('2014-01-01 00:00:00');
     Fixture::createWebsite('2014-01-01 00:00:00');
     Cache::deleteTrackerCache();
     $_SERVER['HTTP_USER_AGENT'] = '';
 }
开发者ID:mgou-net,项目名称:piwik,代码行数:8,代码来源:SettingsTest.php

示例4: setUp

 public function setUp()
 {
     parent::setUp();
     Fixture::createWebsite('2014-01-01 00:00:00');
     Tracker\Cache::deleteTrackerCache();
     $this->response = new Response();
     $this->handler = new Handler();
     $this->handler->setResponse($this->response);
     $this->tracker = new Tracker();
     $this->requestSet = new RequestSet();
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:11,代码来源:HandlerTest.php

示例5: setUp

 public function setUp()
 {
     parent::setUp();
     Fixture::createWebsite('2014-01-01 00:00:00');
     Fixture::createSuperUser();
     Tracker\Cache::deleteTrackerCache();
     $this->backend = $this->createRedisBackend();
     $this->queue = Queue\Factory::makeQueueManager($this->backend);
     $this->response = new Response();
     $this->handler = new Handler();
     $this->handler->setResponse($this->response);
     $this->tracker = new Tracker();
     $this->requestSet = new RequestSet();
 }
开发者ID:ruchitrami,项目名称:plugin-QueuedTracking,代码行数:14,代码来源:HandlerTest.php

示例6: setGlobalExcludedQueryParameters

 /**
  * Sets list of URL query parameters to be excluded on all websites.
  * Will also apply to websites created in the future.
  *
  * @param string $excludedQueryParameters Comma separated list of URL query parameters to exclude from URLs
  * @return bool
  */
 public function setGlobalExcludedQueryParameters($excludedQueryParameters)
 {
     Piwik::checkUserHasSuperUserAccess();
     $excludedQueryParameters = $this->checkAndReturnCommaSeparatedStringList($excludedQueryParameters);
     Option::set(self::OPTION_EXCLUDED_QUERY_PARAMETERS_GLOBAL, $excludedQueryParameters);
     Cache::deleteTrackerCache();
     return true;
 }
开发者ID:a4tunado,项目名称:piwik,代码行数:15,代码来源:API.php

示例7: updateDatabase

 public static function updateDatabase($force = false)
 {
     Cache::deleteTrackerCache();
     Option::clearCache();
     if ($force) {
         // remove version options to force update
         Option::deleteLike('version%');
         Option::set('version_core', '0.0');
     }
     $updater = new Updater();
     $componentsWithUpdateFile = CoreUpdater::getComponentUpdates($updater);
     if (empty($componentsWithUpdateFile)) {
         return false;
     }
     $result = CoreUpdater::updateComponents($updater, $componentsWithUpdateFile);
     if (!empty($result['coreError']) || !empty($result['warnings']) || !empty($result['errors'])) {
         throw new \Exception("Failed to update database (errors or warnings found): " . print_r($result, true));
     }
     return $result;
 }
开发者ID:igorclark,项目名称:piwik,代码行数:20,代码来源:Fixture.php

示例8: tearDown

 public function tearDown()
 {
     parent::tearDown();
     Manager::getInstance()->deleteAll();
     Option::clearCache();
     Site::clearCache();
     Cache::deleteTrackerCache();
     ArchiveTableCreator::clear();
     $tempTableName = Common::prefixTable(LogDataPurger::TEMP_TABLE_NAME);
     Db::query("DROP TABLE IF EXISTS " . $tempTableName);
 }
开发者ID:carriercomm,项目名称:piwik,代码行数:11,代码来源:PrivacyManagerTest.php

示例9: clearCache

 public static function clearCache()
 {
     Cache::deleteTrackerCache();
     self::buildCache()->flushAll();
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:5,代码来源:SettingsStorage.php

示例10: setUserAccess

 /**
  * Set an access level to a given user for a list of websites ID.
  *
  * If access = 'noaccess' the current access (if any) will be deleted.
  * If access = 'view' or 'admin' the current access level is deleted and updated with the new value.
  *
  * @param string $userLogin The user login
  * @param string $access Access to grant. Must have one of the following value : noaccess, view, admin
  * @param int|array $idSites The array of idSites on which to apply the access level for the user.
  *       If the value is "all" then we apply the access level to all the websites ID for which the current authentificated user has an 'admin' access.
  *
  * @throws Exception if the user doesn't exist
  * @throws Exception if the access parameter doesn't have a correct value
  * @throws Exception if any of the given website ID doesn't exist
  *
  * @return bool true on success
  */
 public function setUserAccess($userLogin, $access, $idSites)
 {
     $this->checkAccessType($access);
     $this->checkUserExists($userLogin);
     $this->checkUserIsNotSuperUser($userLogin);
     if ($userLogin == 'anonymous' && $access == 'admin') {
         throw new Exception(Piwik::translate("UsersManager_ExceptionAdminAnonymous"));
     }
     // in case idSites is all we grant access to all the websites on which the current connected user has an 'admin' access
     if ($idSites === 'all') {
         $idSites = \Piwik\Plugins\SitesManager\API::getInstance()->getSitesIdWithAdminAccess();
     } else {
         $idSites = Site::getIdSitesFromIdSitesString($idSites);
     }
     if (empty($idSites)) {
         throw new Exception('Specify at least one website ID in &idSites=');
     }
     // it is possible to set user access on websites only for the websites admin
     // basically an admin can give the view or the admin access to any user for the websites he manages
     Piwik::checkUserHasAdminAccess($idSites);
     $this->deleteUserAccess($userLogin, $idSites);
     // delete UserAccess
     $db = Db::get();
     // if the access is noaccess then we don't save it as this is the default value
     // when no access are specified
     if ($access != 'noaccess') {
         foreach ($idSites as $idsite) {
             $db->insert(Common::prefixTable("access"), array("idsite" => $idsite, "login" => $userLogin, "access" => $access));
         }
     }
     // we reload the access list which doesn't yet take in consideration this new user access
     Access::getInstance()->reloadAccess();
     Cache::deleteTrackerCache();
 }
开发者ID:KiwiJuicer,项目名称:handball-dachau,代码行数:51,代码来源:API.php

示例11: setTestEnvironment

 public static function setTestEnvironment($args = null, $requestMethod = null)
 {
     if (is_null($args)) {
         $requests = new Requests();
         $args = $requests->getRequestsArrayFromBulkRequest($requests->getRawBulkRequest());
         $args = $_GET + $args;
     }
     if (is_null($requestMethod) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
         $requestMethod = $_SERVER['REQUEST_METHOD'];
     } elseif (is_null($requestMethod)) {
         $requestMethod = 'GET';
     }
     // Do not run scheduled tasks during tests
     if (!defined('DEBUG_FORCE_SCHEDULED_TASKS')) {
         TrackerConfig::setConfigValue('scheduled_tasks_min_interval', 0);
     }
     // if nothing found in _GET/_POST and we're doing a POST, assume bulk request. in which case,
     // we have to bypass authentication
     if (empty($args) && $requestMethod == 'POST') {
         TrackerConfig::setConfigValue('tracking_requests_require_authentication', 0);
     }
     // Tests can force the use of 3rd party cookie for ID visitor
     if (Common::getRequestVar('forceEnableFingerprintingAcrossWebsites', false, null, $args) == 1) {
         TrackerConfig::setConfigValue('enable_fingerprinting_across_websites', 1);
     }
     // Tests can force the use of 3rd party cookie for ID visitor
     if (Common::getRequestVar('forceUseThirdPartyCookie', false, null, $args) == 1) {
         TrackerConfig::setConfigValue('use_third_party_id_cookie', 1);
     }
     // Tests using window_look_back_for_visitor
     if (Common::getRequestVar('forceLargeWindowLookBackForVisitor', false, null, $args) == 1 || strpos(json_encode($args, true), '"forceLargeWindowLookBackForVisitor":"1"') !== false) {
         TrackerConfig::setConfigValue('window_look_back_for_visitor', 2678400);
     }
     // Tests can force the enabling of IP anonymization
     if (Common::getRequestVar('forceIpAnonymization', false, null, $args) == 1) {
         self::getDatabase();
         // make sure db is initialized
         $privacyConfig = new PrivacyManagerConfig();
         $privacyConfig->ipAddressMaskLength = 2;
         \Piwik\Plugins\PrivacyManager\IPAnonymizer::activate();
         \Piwik\Tracker\Cache::deleteTrackerCache();
         Filesystem::clearPhpCaches();
     }
     $pluginsDisabled = array('Provider');
     // Disable provider plugin, because it is so slow to do many reverse ip lookups
     PluginManager::getInstance()->setTrackerPluginsNotToLoad($pluginsDisabled);
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:47,代码来源:Tracker.php

示例12: update

 static function update()
 {
     Cache::deleteTrackerCache();
     Filesystem::clearPhpCaches();
 }
开发者ID:josl,项目名称:CGE-File-Sharing,代码行数:5,代码来源:2.5.0-rc4.php

示例13: doUpdate

 public function doUpdate(Updater $updater)
 {
     Cache::deleteTrackerCache();
     Filesystem::clearPhpCaches();
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:5,代码来源:2.5.0-rc4.php

示例14: performTearDown

 public function performTearDown()
 {
     // Note: avoid run SQL in the *tearDown() metohds because it randomly fails on Travis CI
     // with error Error while sending QUERY packet. PID=XX
     $this->tearDown();
     self::unloadAllPlugins();
     if ($this->dropDatabaseInTearDown) {
         $this->dropDatabase();
     }
     DataTableManager::getInstance()->deleteAll();
     Option::clearCache();
     Site::clearCache();
     Cache::deleteTrackerCache();
     Config::getInstance()->clear();
     ArchiveTableCreator::clear();
     \Piwik\Plugins\ScheduledReports\API::$cache = array();
     \Piwik\Registry::unsetInstance();
     \Piwik\EventDispatcher::getInstance()->clearAllObservers();
     $_GET = $_REQUEST = array();
     Translate::unloadEnglishTranslation();
 }
开发者ID:carriercomm,项目名称:piwik,代码行数:21,代码来源:Fixture.php

示例15: realpath

<?php

/**
 *  Proxy to normal piwik.php, but in testing mode
 *
 *  - Use the tests database to record Tracking data
 *  - Allows to overwrite the Visitor IP, and Server datetime
 *
 */
use Piwik\DataTable\Manager;
use Piwik\Option;
use Piwik\Plugins\UserCountry\LocationProvider\GeoIp;
use Piwik\Site;
use Piwik\Tracker\Cache;
use Piwik\Tracker;
require realpath(dirname(__FILE__)) . "/includes.php";
// Wrapping the request inside ob_start() calls to ensure that the Test
// calling us waits for the full request to process before unblocking
ob_start();
Piwik_TestingEnvironment::addHooks();
GeoIp::$geoIPDatabaseDir = 'tests/lib/geoip-files';
Tracker::setTestEnvironment();
Manager::getInstance()->deleteAll();
Option::clearCache();
Site::clearCache();
Cache::deleteTrackerCache();
include PIWIK_INCLUDE_PATH . '/piwik.php';
ob_end_flush();
开发者ID:carriercomm,项目名称:piwik,代码行数:28,代码来源:piwik.php


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