Drupal 9 cache killer kill switch

To disable the cache in Drupal 9, you can use the "kill switch" method. This involves modifying the settings.php file in your Drupal installation. Here are the steps to follow:

  1. Locate the settings.php file in your Drupal installation. It is typically located in the "sites/default" directory.

  2. Open the settings.php file in a text editor.

  3. Look for the following code block:

$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
  1. Uncomment these lines by removing the leading "//" characters, so they look like this:
$settings['cache']['bins']['render'] = 'cache.backend.null';
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
  1. Save the settings.php file.

By uncommenting these lines, you are telling Drupal to use a "null" cache backend, which effectively disables caching. This can be useful during development or debugging when you want to see changes immediately without caching getting in the way.

Remember to be cautious when disabling caching in a production environment, as it can negatively impact performance.