Is it possible to disable APC caching completely in Drupal 8 without modifying the php.ini settings (i.e. only by modifying the Drupal settings)?

1 Answer 1


There are multiple settings necessary to do so:

in active settings.php:

 * Class Loader.
 * If the APC extension is detected, the Symfony APC class loader is used for
 * performance reasons. Detection can be prevented by setting
 * class_loader_auto_detect to false, as in the example below.
$settings['class_loader_auto_detect'] = FALSE;

// Default cache backend.
$settings['cache']['default'] = 'cache.backend.database'; // or any other alternative cache backend

After looking at Berdirs comment and diving further into code and looking at more usages of apcu within Drupal it appears to be pretty much impossible to catch every usage / and even if you manage to find all of them - disabling at some points is not possible (e.g. no configuration options present).

  • The default isn't going to help you, you need to specifically change each f the fast chained bin, which by default are discovery, config and bootstrap. The default worked by accident before Drupal 8.2, but that was considered a bug and changed. Plus, there are a few things more, for example there is file caching for some yaml files based on Apcu
    – Berdir
    Jan 13, 2017 at 19:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.