@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | // Get the page number of this request |
183 | 183 | $request = Craft::$app->getRequest(); |
184 | 184 | if (!$request->isConsoleRequest) { |
185 | - $this->paginationPage = (string)$request->pageNum; |
|
185 | + $this->paginationPage = (string) $request->pageNum; |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 | |
@@ -251,10 +251,10 @@ discard block |
||
251 | 251 | $dependency = $this->containerDependency; |
252 | 252 | $uniqueKey = $dependency->tags[3] ?? self::GLOBALS_CACHE_KEY; |
253 | 253 | list($this->metaGlobalVars, $this->metaSiteVars) = Craft::$app->getCache()->getOrSet( |
254 | - self::GLOBALS_CACHE_KEY . $uniqueKey, |
|
254 | + self::GLOBALS_CACHE_KEY.$uniqueKey, |
|
255 | 255 | function() use ($uniqueKey) { |
256 | 256 | Craft::info( |
257 | - self::GLOBALS_CACHE_KEY . ' cache miss: ' . $uniqueKey, |
|
257 | + self::GLOBALS_CACHE_KEY.' cache miss: '.$uniqueKey, |
|
258 | 258 | __METHOD__ |
259 | 259 | ); |
260 | 260 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | ?? 1; |
381 | 381 | } |
382 | 382 | // Handle pagination |
383 | - $paginationPage = 'page' . $this->paginationPage; |
|
383 | + $paginationPage = 'page'.$this->paginationPage; |
|
384 | 384 | // Get the path for the current request |
385 | 385 | $request = Craft::$app->getRequest(); |
386 | 386 | $requestPath = '/'; |
@@ -405,21 +405,21 @@ discard block |
||
405 | 405 | } |
406 | 406 | } |
407 | 407 | // Get our cache key |
408 | - $cacheKey = $uri . $siteId . $paginationPage . $requestPath . $this->getAllowedUrlParams() . $token; |
|
408 | + $cacheKey = $uri.$siteId.$paginationPage.$requestPath.$this->getAllowedUrlParams().$token; |
|
409 | 409 | // For requests with a status code of >= 400, use one cache key |
410 | 410 | if (!$request->isConsoleRequest) { |
411 | 411 | $response = Craft::$app->getResponse(); |
412 | 412 | if ($response->statusCode >= 400) { |
413 | - $cacheKey = $siteId . self::INVALID_RESPONSE_CACHE_KEY . $response->statusCode; |
|
413 | + $cacheKey = $siteId.self::INVALID_RESPONSE_CACHE_KEY.$response->statusCode; |
|
414 | 414 | } |
415 | 415 | } |
416 | 416 | // Load the meta containers |
417 | 417 | $dependency = new TagDependency([ |
418 | 418 | 'tags' => [ |
419 | 419 | self::GLOBAL_METACONTAINER_CACHE_TAG, |
420 | - self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId, |
|
421 | - self::METACONTAINER_CACHE_TAG . $uri . $siteId, |
|
422 | - self::METACONTAINER_CACHE_TAG . $cacheKey, |
|
420 | + self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId, |
|
421 | + self::METACONTAINER_CACHE_TAG.$uri.$siteId, |
|
422 | + self::METACONTAINER_CACHE_TAG.$cacheKey, |
|
423 | 423 | ], |
424 | 424 | ]); |
425 | 425 | $this->containerDependency = $dependency; |
@@ -436,10 +436,10 @@ discard block |
||
436 | 436 | } else { |
437 | 437 | $cache = Craft::$app->getCache(); |
438 | 438 | list($this->metaGlobalVars, $this->metaSiteVars, $this->metaSitemapVars, $this->metaContainers) = $cache->getOrSet( |
439 | - self::CACHE_KEY . $cacheKey, |
|
439 | + self::CACHE_KEY.$cacheKey, |
|
440 | 440 | function() use ($uri, $siteId) { |
441 | 441 | Craft::info( |
442 | - 'Meta container cache miss: ' . $uri . '/' . $siteId, |
|
442 | + 'Meta container cache miss: '.$uri.'/'.$siteId, |
|
443 | 443 | __METHOD__ |
444 | 444 | ); |
445 | 445 | $this->loadGlobalMetaContainers($siteId); |
@@ -843,10 +843,10 @@ discard block |
||
843 | 843 | $cache = Craft::$app->getCache(); |
844 | 844 | TagDependency::invalidate( |
845 | 845 | $cache, |
846 | - self::METACONTAINER_CACHE_TAG . $metaBundleSourceId . $metaBundleSourceType . $siteId |
|
846 | + self::METACONTAINER_CACHE_TAG.$metaBundleSourceId.$metaBundleSourceType.$siteId |
|
847 | 847 | ); |
848 | 848 | Craft::info( |
849 | - 'Meta bundle cache cleared: ' . $metaBundleSourceId . ' / ' . $metaBundleSourceType . ' / ' . $siteId, |
|
849 | + 'Meta bundle cache cleared: '.$metaBundleSourceId.' / '.$metaBundleSourceType.' / '.$siteId, |
|
850 | 850 | __METHOD__ |
851 | 851 | ); |
852 | 852 | // Trigger an event to let other plugins/modules know we've cleared our caches |
@@ -873,9 +873,9 @@ discard block |
||
873 | 873 | if ($siteId === null) { |
874 | 874 | $siteId = Craft::$app->getSites()->currentSite->id ?? 1; |
875 | 875 | } |
876 | - TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG . $uri . $siteId); |
|
876 | + TagDependency::invalidate($cache, self::METACONTAINER_CACHE_TAG.$uri.$siteId); |
|
877 | 877 | Craft::info( |
878 | - 'Meta container cache cleared: ' . $uri . ' / ' . $siteId, |
|
878 | + 'Meta container cache cleared: '.$uri.' / '.$siteId, |
|
879 | 879 | __METHOD__ |
880 | 880 | ); |
881 | 881 | // Trigger an event to let other plugins/modules know we've cleared our caches |
@@ -1018,7 +1018,7 @@ discard block |
||
1018 | 1018 | |
1019 | 1019 | // Handle re-creating the `mainEntityOfPage` so that the model injected into the |
1020 | 1020 | // templates has the appropriate attributes |
1021 | - $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE . JsonLdService::GENERAL_HANDLE; |
|
1021 | + $generalContainerKey = MetaJsonLdContainer::CONTAINER_TYPE.JsonLdService::GENERAL_HANDLE; |
|
1022 | 1022 | $generalContainer = $this->metaContainers[$generalContainerKey]; |
1023 | 1023 | if (($generalContainer !== null) && !empty($generalContainer->data['mainEntityOfPage'])) { |
1024 | 1024 | /** @var MetaJsonLd $jsonLdModel */ |
@@ -90,24 +90,24 @@ |
||
90 | 90 | } |
91 | 91 | // Get our cache key |
92 | 92 | $asArrayKey = $asArray ? 'true' : 'false'; |
93 | - $cacheKey = $uri . $siteId . implode($containerKeys) . $asArrayKey . Seomatic::$environment . $token; |
|
93 | + $cacheKey = $uri.$siteId.implode($containerKeys).$asArrayKey.Seomatic::$environment.$token; |
|
94 | 94 | // Load the meta containers |
95 | 95 | $dependency = new TagDependency([ |
96 | 96 | 'tags' => [ |
97 | 97 | $metaContainers::GLOBAL_METACONTAINER_CACHE_TAG, |
98 | - $metaContainers::METACONTAINER_CACHE_TAG . $sourceId . $sourceBundleType . $siteId, |
|
99 | - $metaContainers::METACONTAINER_CACHE_TAG . $uri . $siteId, |
|
100 | - $metaContainers::METACONTAINER_CACHE_TAG . $cacheKey, |
|
98 | + $metaContainers::METACONTAINER_CACHE_TAG.$sourceId.$sourceBundleType.$siteId, |
|
99 | + $metaContainers::METACONTAINER_CACHE_TAG.$uri.$siteId, |
|
100 | + $metaContainers::METACONTAINER_CACHE_TAG.$cacheKey, |
|
101 | 101 | ], |
102 | 102 | ]); |
103 | 103 | |
104 | 104 | $cache = Craft::$app->getCache(); |
105 | 105 | $result = $cache->getOrSet( |
106 | - self::CACHE_KEY . $cacheKey, |
|
106 | + self::CACHE_KEY.$cacheKey, |
|
107 | 107 | function() use ($uri, $siteId, $containerKeys, $asArray) { |
108 | 108 | $result = []; |
109 | 109 | Craft::info( |
110 | - 'Meta controller container cache miss: ' . $uri . '/' . $siteId, |
|
110 | + 'Meta controller container cache miss: '.$uri.'/'.$siteId, |
|
111 | 111 | __METHOD__ |
112 | 112 | ); |
113 | 113 | // Load the meta containers and parse our globals |