Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes report generation site aware #12626

Merged
merged 12 commits into from Mar 20, 2018
Merged

Makes report generation site aware #12626

merged 12 commits into from Mar 20, 2018

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Mar 18, 2018

based on #12618

fixes #12560

@@ -117,7 +117,7 @@ private static function getMapOfModuleActionsToReport()
public function getAllReports()
{
$reports = $this->getAllReportClasses();
$cacheId = CacheId::languageAware('Reports' . md5(implode('', $reports)));
$cacheId = CacheId::siteAware(CacheId::languageAware('Reports' . md5(implode('', $reports))));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method itself does not really need an site aware caching, but the event Report.addReports might add reports based on the site id. Which is actually the case in some of our plugins...

@tsteur
Copy link
Member

tsteur commented Mar 18, 2018

Haven't tested it but code looks straight forward. (compare here: site-aware-dimensions-cache...archivetasks )

@mattab mattab added this to the 3.3.1 milestone Mar 19, 2018
@diosmosis
Copy link
Member

LGTM, this can probably be merged w/o #12618, would make it easier

@mattab mattab merged commit c75c80a into 3.x-dev Mar 20, 2018
@mattab mattab deleted the archivetasks branch March 20, 2018 10:21
InfinityVoid pushed a commit to InfinityVoid/matomo that referenced this pull request Oct 11, 2018
* Make dimensions cache site aware since CustomDimensions adds different dimensions based on the current site.

* Unset idSites when overwriting idSite for cache & move that code to helper method in CacheId.

* Handle idsite tracker param in CacheId::siteAware().

* Handle both $_GET and $_POST members in CacheId::siteAware().

* Use CacheId::siteAware() in MetricsList.

* Set idsite if in tracker mode when overwriting idSite for cache + unset values if they were not set to begin w/ + add test for CacheId::overwriteIdSiteForCache().

* Fix tests: return idArchive in ArchiveProcessor\Loader::prepareArchvie().

* Move CacheId idSite overwriting function to Context class.

* Support $_GET/$_POST values being arrays in CacheId::siteAware to fix test.

* switch site context when generating reports

* makes ReportsProvider site aware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Email reports sent via the cron core:archive task do not contain reports that depend on idsite
4 participants