Menu theme suggestion ignored when cache turned on
function bootstrap_custom_preprocess_block(&amp;$vars) {
    if($vars['derivative_plugin_id'] == 'header-navigation') {
        //-- This stops the block being cached in drupal 8
        $vars['#cache']['max-age'] = 0;
    }
}


This works for me. Block preprocess is correct.