To disable caching in Drupal, follow the steps given below:
Copy the file
/sites/example.settings.local.php
to
/sites/default/settings.local.php
In the
settings.php
file, uncomment the following line to include the settings file:
Ensure the following line is uncommented in
settings.local.php
:
Disable CSS/JS aggregation by setting these configurations:
Disable render and dynamic page caching:
Ensure Twig debugging and caching are set correctly in
development.services.yml
:
This will disable caching and is ideal for development. However, remember to re-enable caching for production environments.