Created
August 31, 2015 12:19
-
-
Save bogomolov-dev/1d9b2c7ee0a8e877df3f to your computer and use it in GitHub Desktop.
Cache in Drupal 8 für einzelne Inhaltstypen oder Seiten deaktivieren
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mymodule_preprocess_html(&$variables) { | |
if (array_key_exists('node_type', $variables) && $variables['node_type'] === 'category') { | |
\Drupal::service('page_cache_kill_switch')->trigger(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment