this bit goes in development.services.yml
services:
cache.backend.null:
class: Drupal\Core\Cache\NullBackendFactory
parameters:
twig.config:
debug: true
auto_reload: null
cache: false
please do note that turning off the cache causes twig to compile every template needed for your view on every hit. This can be slowly, turn it back on if you do not need be 100% sure the compiled template is really fresh
this bit goes in development.settings.php
<?php
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
// disable render cache
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
And finally add this at the end of your settings.local.php or settings.php
$development_config = DRUPAL_ROOT . '/sites/development.settings.php';
if (file_exists($development_config)){
require_once $development_config;
}