deleteAll(); PhpStorageFactory::get('twig')->deleteAll(); // Bootstrap up to where caches exist and clear them. $kernel = new DrupalKernel('prod', $classloader); $kernel->setSitePath(DrupalKernel::findSitePath($request)); $kernel->prepareLegacyRequest($request); foreach (Cache::getBins() as $bin) { $bin->deleteAll(); } // Disable the page cache. drupal_page_is_cacheable(FALSE); drupal_flush_all_caches(); // Restore Drupal's error and exception handlers. // @see \Drupal\Core\DrupalKernel::boot() set_error_handler('_drupal_error_handler'); set_exception_handler('_drupal_exception_handler'); }