Warning: Cannot modify header information - headers already sent by (output started at /www/wwwroot/sbboke.com/wp-content/plugins/wordpress-seo/src/integrations/front-end-integration.php:409) in /www/wwwroot/sbboke.com/wp-content/themes/pacify/content-single.php on line 5

如何在Magento 2中启用/禁用缓存

当您使用Magento存储时,如何在Magento 2中禁用/启用缓存命令行是一个常规主题。Magento 2默认具有12种缓存类型。有5条简单的命令可在命令行中管理缓存。在这篇文章中,我将向您展示如何逐步执行每个命令行。

首先,我们需要知道什么是缓存?

什么是Magento 2中的缓存

首次安装Magento存储时,默认情况下启用文件系统缓存
要更改它,您可以编辑env.phpin app/etc文件夹。找到cache_types并更改array_key值的值(1或0)。

设置应如下所示:

'cache_types' =>
    array (
        'config' => 1,
        'layout' => 1,
        'block_html' => 1,
        'collections' => 1,
        'db_ddl' => 1,
        'eav' => 1,
        'full_page' => 0,
        'translate' => 1,
        'config_integration' => 1,
        'config_webservice' => 1,
        'config_integration_api' => 1,
    ),
); 

相关文章

0 0 投票数
文章评分
订阅评论
提醒
0 评论
内联反馈
查看所有评论