【发布时间】:2017-01-02 11:28:58
【问题描述】:
尽管我按照本文中的所有步骤进行操作,但我仍然需要在 Drupal 中手动清除缓存(config/development/performance):https://www.drupal.org/node/2598914
我按照启用本地开发设置
标题下的步骤操作我使用 MAMP 并在 MAMP 设置中禁用了缓存。
【问题讨论】:
尽管我按照本文中的所有步骤进行操作,但我仍然需要在 Drupal 中手动清除缓存(config/development/performance):https://www.drupal.org/node/2598914
我按照启用本地开发设置
标题下的步骤操作我使用 MAMP 并在 MAMP 设置中禁用了缓存。
【问题讨论】:
尝试将以下内容添加到“服务”下的 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;
【讨论】:
问题出在我的sites/development.services.yml 文件中。 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
【讨论】: