function TaxonomyIndexTid::getCacheContexts

Same name in other branches
  1. 8.9.x core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php \Drupal\taxonomy\Plugin\views\filter\TaxonomyIndexTid::getCacheContexts()

Overrides FilterPluginBase::getCacheContexts

File

core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php, line 410

Class

TaxonomyIndexTid
Filter by term id.

Namespace

Drupal\taxonomy\Plugin\views\filter

Code

public function getCacheContexts() {
    $contexts = parent::getCacheContexts();
    // The result potentially depends on term access and so is just cacheable
    // per user.
    // @todo See https://www.drupal.org/node/2352175.
    $contexts[] = 'user';
    return $contexts;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.