Loading l10n_community/src/Plugin/Block/ProjectStatisticsBlock.php +11 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\l10n_community\Plugin\Block; use Drupal\Core\Block\BlockBase; use Drupal\Core\Cache\Cache; use Drupal\Core\Link; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Url; Loading Loading @@ -126,4 +127,14 @@ class ProjectStatisticsBlock extends BlockBase implements ContainerFactoryPlugin return $build; } /** * {@inheritdoc} */ public function getCacheContexts() { return Cache::mergeContexts( parent::getCacheContexts(), ['url.path'] ); } } Loading
l10n_community/src/Plugin/Block/ProjectStatisticsBlock.php +11 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Drupal\l10n_community\Plugin\Block; use Drupal\Core\Block\BlockBase; use Drupal\Core\Cache\Cache; use Drupal\Core\Link; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Url; Loading Loading @@ -126,4 +127,14 @@ class ProjectStatisticsBlock extends BlockBase implements ContainerFactoryPlugin return $build; } /** * {@inheritdoc} */ public function getCacheContexts() { return Cache::mergeContexts( parent::getCacheContexts(), ['url.path'] ); } }