Drupal - Turn off Twig cache

I resolved my problem by following lines in settings.local.php.

# $settings['cache']['bins']['render'] = 'cache.backend.null';

duplicate the line and enable it (by remove # before it) and change render to dynamic_page_cache I mean the following line resolved your issue

 $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';

in Drupal >= 8.8 use

  $settings['cache']['bins']['render'] = 'cache.backend.memory';

In Drupal 8.8 adding this to sites/default/settings.local.php worked for me:

$settings['cache']['bins']['render'] = 'cache.backend.memory';

For some reasons when I try to add it as recommended ('cache.backend.null') I have the following error

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "cache.backend.null". Did you mean one of these: "cache.backend.apcu", "cache.backend.memory", "cache.backend.php"?

Tags:

Caching

Theming

8