diff --git a/web/modules/custom/blog/src/Plugin/Block/RelatedPostsBlock.php b/web/modules/custom/blog/src/Plugin/Block/RelatedPostsBlock.php index c7f9141..69ccdb1 100644 --- a/web/modules/custom/blog/src/Plugin/Block/RelatedPostsBlock.php +++ b/web/modules/custom/blog/src/Plugin/Block/RelatedPostsBlock.php @@ -80,6 +80,10 @@ class RelatedPostsBlock extends BlockBase implements ContainerFactoryPluginInter return 604800; } + public function getCacheContexts(): array { + return Cache::mergeContexts(parent::getCacheContexts(), ['route']); + } + public function getCacheTags(): array { /** @var Post $post */ $post = $this->currentRouteMatch->getParameter('node');