Drupal 8缓存无法进行开发

时间:2017-01-02 11:28:58

标签: caching drupal drupal-8

尽管我已按照本文中的所有步骤操作,但仍需要在Drupal (config / development / performance)中手动清除缓存:https://www.drupal.org/node/2598914

我按照启用本地开发设置

标题下的步骤操作

我使用MAMP并在MAMP设置中禁用了缓存。

2 个答案:

答案 0 :(得分:0)

尝试将以下内容添加到'services'下的development.services.yml中:

cache.backend.memory:
class: Drupal\Core\Cache\MemoryBackendFactory

并将这些行添加到settings.local.php:

$config['system.performance']['css']['gzip'] = FALSE;
$config['system.performance']['js']['gzip'] = FALSE;
$config['system.performance']['response']['gzip'] = FALSE;

答案 1 :(得分:0)

问题出在我的parameters:文件中。 # Local development services. # # To activate this feature, follow the instructions at the top of the # 'example.settings.local.php' file, which sits next to this file. services: cache.backend.null: class: Drupal\Core\Cache\NullBackendFactory parameters: twig.config: debug: true auto_reload: true cache: false 定义了两次。该文件应如下所示:

print date('Y-m-d',strtotime('last day of this month'));