Disable Drupal 8 caching during development
- Copy and rename:
- sites/example.settings.local.php --> sites/default/settings.local.php
- uncomment the following lines (search for it):
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['page'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
- Open
sites/default/settings.php
- uncomment these lines (717):
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
include $app_root . '/' . $site_path . '/settings.local.php';
}
- Open
development.services.ymlin the sites folder and add the following block to disable the twig cache:
parameters:
twig.config:
debug: true
auto_reload: true
cache: false