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
Conversation
…t dimensions based on the current site.
…elper method in CacheId.
…et values if they were not set to begin w/ + add test for CacheId::overwriteIdSiteForCache().
@@ -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)))); |
There was a problem hiding this comment.
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...
Haven't tested it but code looks straight forward. (compare here: site-aware-dimensions-cache...archivetasks ) |
LGTM, this can probably be merged w/o #12618, would make it easier |
* 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
based on #12618
fixes #12560