Skip to content

Commit 5944d9a

Browse files
authored
Merge pull request #230 from City-of-Helsinki/UHF-11523
UHF-11523: Adding cahce tags for crisis news paragraph
2 parents 0616f36 + bbc361a commit 5944d9a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

public/themes/custom/hdbt_subtheme/hdbt_subtheme.theme

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ function hdbt_subtheme_preprocess_paragraph(&$variables) {
103103
->getViewBuilder('node')
104104
->view($result->_entity, 'medium_teaser');
105105
}
106+
107+
// Make sure any news item insert, update or delete invalidates the
108+
// cache for this section.
109+
$variables['#cache']['tags'][] = 'node_list:news_item';
106110
}
107111
}
108112
}

0 commit comments

Comments
 (0)