Unverified Commit 8d1725ca authored by Stefan Auditor's avatar Stefan Auditor Committed by Stefan Auditor
Browse files

Issue #3282696 by sanduhrs: Port of l10n_community: Add block cache context

parent 74766820
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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;
@@ -126,4 +127,14 @@ class ProjectStatisticsBlock extends BlockBase implements ContainerFactoryPlugin
    return $build;
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheContexts() {
    return Cache::mergeContexts(
      parent::getCacheContexts(),
      ['url.path']
    );
  }

}