Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. function template-name_preprocess_block(&$vars) {
  2. if($vars['derivative_plugin_id'] == 'add-block-id-name') {
  3. //-- This stops the block being cache in drupal 8
  4. $vars['#cache']['max-age'] = 0;
  5.  
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement