Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
timkelty committed May 7, 2024
1 parent cc23fb4 commit ffc6826
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StaticCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ private function handleBeforeRenderPageTemplate(TemplateEvent $event): void
return;
}

// capture the matched element, if there was one
/** @var UrlManager $urlManager */
$urlManager = Craft::$app->getUrlManager();
$matchedElement = $urlManager->getMatchedElement();

if ($matchedElement) {
Craft::$app->getElements()->collectCacheInfoForElement($matchedElement);
}
Expand Down

0 comments on commit ffc6826

Please sign in to comment.