Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2020-01-08 09:11:45 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2020-01-08 09:11:45 +0300
commit18b0815a78d158b45afbd752c7e21581321acb4c (patch)
treee7086a238b32d2f410d5e41b332d106a044372b3 /plugins
parent4ad9f4ac89e6cbdb7b7c50bed4155193eb762dcc (diff)
Use tracker cache in ArchiveInvalidator so extra query is not needed. (#15358)
* Use tracker cache in ArchiveInvalidator so extra query is not needed. * apply review fixes * applied another feedback item
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreHome/CoreHome.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php
index 29fe78c2c9..6587e5ad13 100644
--- a/plugins/CoreHome/CoreHome.php
+++ b/plugins/CoreHome/CoreHome.php
@@ -8,8 +8,10 @@
*/
namespace Piwik\Plugins\CoreHome;
+use Piwik\Archive\ArchiveInvalidator;
use Piwik\Columns\ComputedMetricFactory;
use Piwik\Columns\MetricsList;
+use Piwik\Container\StaticContainer;
use Piwik\IP;
use Piwik\Piwik;
use Piwik\Plugin\ArchivedMetric;
@@ -43,9 +45,22 @@ class CoreHome extends \Piwik\Plugin
'Request.initAuthenticationObject' => 'initAuthenticationObject',
'AssetManager.addStylesheets' => 'addStylesheets',
'Request.dispatchCoreAndPluginUpdatesScreen' => 'initAuthenticationObject',
+ 'Tracker.setTrackerCacheGeneral' => 'setTrackerCacheGeneral',
);
}
+ public function isTrackerPlugin()
+ {
+ return true;
+ }
+
+ public function setTrackerCacheGeneral(&$cacheGeneral)
+ {
+ /** @var ArchiveInvalidator $archiveInvalidator */
+ $archiveInvalidator = StaticContainer::get(ArchiveInvalidator::class);
+ $cacheGeneral[ArchiveInvalidator::TRACKER_CACHE_KEY] = $archiveInvalidator->getAllRememberToInvalidateArchivedReportsLater();
+ }
+
public function addStylesheets(&$mergedContent)
{
$themeStyles = ThemeStyles::get();