WDTUTORIALS

Drupal 8 - How To Disable Page Caching

Tutorial on how to enable debug mode and disable page caching.

With Drupal Console

drupal site:mode dev

This creates/modifies sites/default/services.yml file so you might have to change the folder sites/default or the file services.yml permissions.

Manually

You can also do it manually:

cp sites/example.settings.local.php sites/default/settings.local.php

in sites/default/settings.local.php uncomment these lines:

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

In sites/default/settings.php uncomment these lines:

if (file_exists(__DIR__ . '/settings.local.php')) {
  include __DIR__ . '/settings.local.php';
}

In sites/development.services.yml add these lines:

parameters:
  twig.config:
    debug: true
    auto_reload: true
    cache: false

Samuli Natri built his first website in the late 90’s. He is very passionate about web technologies. He attended Helsinki University Of Technology (Computer Science) and Helsinki University (Social Sciences). He is the founder of WDTutorials.com.

Featured Python Tutorial For Beginners - Essentials In 1 Hour

Copyright @ 2018 WDTutorials.com. All rights reserved. Privacy policy.Terms Of Service.