I'm quite desperate. I have disabled it in the admin backend (Administration -> Configuration -> Development -> "Page cache maximum age" = "<no caching>"). In sites/default/services.yml I have:

    debug: true
    auto_reload: true
    cache: false

I even tried to disable the opcache (wich makes not much sense, of course). The templates get translated (or rendered?) only once after I manually clear the cache.

I'm using Drupal 8.3.4, PHP 7.1 with php-fpm, postgresql and lighttpd on CentOS.

To always clear the cache – by clicking in the interface or drush cr – feels like compiling a c++ application. And doing a delete from cache_render; delete from cache_dynamic_page_cache; delete from cache_entity; in the psql console feels 500 times faster but also isn't really convenient.

  • What are you working on that is cacheing? Things like the addition of new templates will always require a cache clear if I understand correctly. Also if you don't want to use drush cr. You can truncate all the tables in the db that start with cache_ if you have database access – Matt Jul 5 '17 at 17:59

You need to follow the procedure in /sites/example.settings.local.php:

 * @file
 * Local development override configuration feature.
 * To activate this feature, copy and rename it such that its path plus
 * filename is 'sites/default/settings.local.php'. Then, go to the bottom of
 * 'sites/default/settings.php' and uncomment the commented lines that mention
 * 'settings.local.php'.
 * If you are using a site name in the path, such as 'sites/example.com', copy
 * this file to 'sites/example.com/settings.local.php', and uncomment the lines
 * at the bottom of 'sites/example.com/settings.php'.

This will enable the service for a null cache backend in development.services.yml, which you then can assign to cache bins of your choice by uncommenting these lines:

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

Then you no longer need to truncate the cache tables.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.