diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
index a68c3c8c6c..ff6d7b1902 100644
--- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
+++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php
@@ -385,6 +385,21 @@ public function getCacheContexts() {
   /**
    * {@inheritdoc}
    */
+  public function getCacheTags() {
+    $cache_tags = parent::getCacheTags();
+    $vocabulary = $this->vocabularyStorage->load($this->options['vid']);
+    if ($vocabulary) {
+      $cache_tags += $vocabulary->getCacheTags();
+    }
+    // There is no vocabulary specific tag for 'taxonomy_term_list' so we add
+    // the generic tag here to catch any updates to tags.
+    $cache_tags[] = 'taxonomy_term_list';
+    return $cache_tags;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
   public function calculateDependencies() {
     $dependencies = parent::calculateDependencies();
 
diff --git a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidFilterTest.php b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidFilterTest.php
index 6fd1eba865..389778b92f 100644
--- a/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidFilterTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Views/TaxonomyIndexTidFilterTest.php
@@ -24,7 +24,7 @@ class TaxonomyIndexTidFilterTest extends TaxonomyTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $testViews = ['test_filter_taxonomy_index_tid__non_existing_dependency'];
+  public static $testViews = ['test_filter_taxonomy_index_tid__non_existing_dependency', 'test_filter_taxonomy_index_tid'];
 
   /**
    * @var \Drupal\taxonomy\TermInterface[]
@@ -153,4 +153,21 @@ public function testPostUpdateFunction() {
     ], $view->getDependencies());
   }
 
+  /**
+   * Tests that the cache tags for the chosen vocabulary are added.
+   */
+  public function testGetCacheTags() {
+    /** @var \Drupal\views\Entity\View $view */
+    $view = View::load('test_filter_taxonomy_index_tid');
+    $view_executable = $view->getExecutable();
+    $view_executable->initDisplay();
+    $cache_metadata = $view_executable->getDisplay()->calculateCacheMetadata();
+
+    $expected_cache_tags = [
+      'config:taxonomy.vocabulary.tags',
+      'taxonomy_term_list',
+    ];
+    $this->assertEquals($expected_cache_tags, $cache_metadata->getCacheTags());
+  }
+
 }
