The Everywhere Cloud

Deploy an instance.
Accelerate your application.

Disable Caching in Drupal 8

The following procedure disables some caching features in Drupal 8 that prevent changes in the site from taking effect immediately. If Drupal is chosen as the user interface, instances where its caching might be undesirable include (1) web-based Supervisory Control and Data Acquisition (SCADA) applications in engineering, and (2) real-time computational reports for scientific telemetry.


1. In the Drupal folder, open the file that handles the Drupal settings.


2. Scroll to the bottom of the file and add the lines marked "Drupal8" as follows.

// ...

// Disable some Drupal caching.
$settings['container_yamls'][] = DRUPAL_ROOT.'/sites/'; //Drupal8
$settings['cache']['bins']['render'] = 'cache.backend.null'; //Drupal8
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null'; //Drupal8


3. Save the file and reload the page.


The preceding code can be found in Drupal's "sites/example.settings.local.php" file. The documentation comments in the file also suggests alternative ways to activate these cache-disabling features.



Popular posts from this blog

Enabling HTTPS in Home Assistant

Configuring the FreeBSD Firewall with IPFW

Running Home Assistant on FreeBSD Servers