By Sifro


2019-02-09 08:31:09 8 Comments

I disabled cache with the command

drupal site:mode dev

I have overridden html.html.twig and node.html.twig.

If I change something on html.html.twig and refresh the page, the changes take place.

If I change something on node.html.twig and refresh the page, the changes do not appear, unless I also clear the cache or edit the node.

If I open the same page with a different browser, changes do take place, but if I make another edit and refresh, it won't work.

So I thought of some kind of browser caching, but clearing the caches in Chrome doesn't help.

How can I force Drupal to re-read node.html.twig without clearing the caches or editing a node everytime?

Thanks!

1 comments

@zaporylie 2019-02-09 18:39:52

drupal site:mode dev won't turn off all the caches. Tunning caching for dev purpose requires manual changes to the settings.(local.)php.

Open the example.settings.local.php file located in the sites directory and copy its content over to site's settings.(local.)php file.
Focus on the cache bins - in your case render and dynamic_page_cache.

$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';

@berramou 2019-02-09 21:36:10

And don't forget to uncomment this line if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { include $app_root . '/' . $site_path . '/settings.local.php'; } in your settings.php

Related Questions

Sponsored Content

1 Answered Questions

[SOLVED] Devel issue - "Rebuild the theme registry on every page load" won't work

  • 2015-02-09 03:27:32
  • JohnDoea
  • 543 View
  • 0 Score
  • 1 Answer
  • Tags:   theming caching

1 Answered Questions

[SOLVED] Disable caching of attached css/js libraries for custom module?

  • 2018-11-12 23:33:05
  • sceithamer
  • 341 View
  • 0 Score
  • 1 Answer
  • Tags:   8 caching

2 Answered Questions

[SOLVED] Why aren't my pages caching?

  • 2015-12-22 19:11:52
  • RaisinBranCrunch
  • 1138 View
  • 1 Score
  • 2 Answer
  • Tags:   8 caching

1 Answered Questions

[SOLVED] Delay in code changes on custom pages in drupal 8 in a docker environment

  • 2018-01-04 12:34:27
  • Nicolaj
  • 111 View
  • 1 Score
  • 1 Answer
  • Tags:   8

1 Answered Questions

[SOLVED] Best way to clear cache / reload site when theming css

  • 2016-11-22 11:42:57
  • drupalfan
  • 519 View
  • -1 Score
  • 1 Answer
  • Tags:   7 theming

3 Answered Questions

[SOLVED] Implementing CKeditor's plugin

  • 2014-12-06 21:20:40
  • lifecoder
  • 7271 View
  • 3 Score
  • 3 Answer
  • Tags:   8 wysiwyg

1 Answered Questions

[SOLVED] Why does my background image only sometimes show?

  • 2016-02-23 23:29:48
  • Andrew
  • 786 View
  • 1 Score
  • 1 Answer
  • Tags:   caching theming

1 Answered Questions

[SOLVED] Bitnami Installation forcing me to flush caches while theming

3 Answered Questions

[SOLVED] Prevent caching of a node

  • 2014-12-06 14:11:33
  • Vadim Khamzin
  • 4200 View
  • 4 Score
  • 3 Answer
  • Tags:   caching 8 theming

1 Answered Questions

[SOLVED] Clearing the cache changes the nice menu every time

Sponsored Content