Blogs on

cache

knackforge blog

Disable Drupal 8 cache during development

We know Drupal 8 has a heavy caching mechanism, so we need to clear cache for changes made in twig file or some other file to reflect in the site. Basically, a themer or developer won't love the caching system on the development stage. So it is better to disable cache on the development stage rather than clearing cache for every change being made.

And here are the steps to disable cache and save your valuable time:

  • Copy and rename the sites/example.settings.local.php file as sites/default/settings.local.php

Continue reading →
knackforge blog

Drupal 8 block caching

The approach to custom block caching is different in Drupal 8 from Drupal 7. In Drupal 8, all renderable arrays are cacheable, even those returned by custom block.

Examples:

  • Some expensive-to-calculate data depends on the active theme: different results for different themes. Then you'd vary by the theme cache context.

Continue reading →