How to disable cache in Drupal?

by tressie.damore , in category: PHP Frameworks , 9 months ago

How to disable cache in Drupal?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by wilmer.lemke , 3 months ago

@tressie.damore 

To disable cache in Drupal, follow these steps:

  1. Log in to your Drupal site as an administrator.
  2. Go to the "Configuration" menu and click on "Performance."
  3. In the "Caching" section, select "None" for both "Page cache" and "Block cache."
  4. Click the "Save configuration" button.


This will disable cache for both pages and blocks on your Drupal site. Note that disabling cache can significantly impact the performance of your site, especially if you have a lot of traffic. You should only disable cache if you need to make changes to your site that are not being reflected when cache is enabled.


Alternatively, you can also disable cache by adding the following line of code to your site's settings.php file:

1
$conf['cache'] = 0;


This will globally disable caching for your site.