当你使用Magento商店时如何刷新Magento 2中的Cache命令行是基本的经常使用操做。Magento 2默认有12种缓存类型。在命令行中有5个简单的命令来管理缓存。在这篇文章中,我将逐步向您展现每一个命令行。php
我将在这个截图中解释缓存管理html
php bin/magento cache:clean
和php bin/magento cache:flush
cd /var/www/magento2
cd /var/www/html/magento2
cd /d/xampp/htdocs/magento2
在Windows的状况下,假如你安装Xampp在D驱动器。web
在Magento 2中,让咱们尝试使用php bin/magento
显示命令行指南,它将显示以下:ubuntu
Usage:
command [options] [arguments]windows
Options:
–help (-h) Display this help message
–quiet (-q) Do not output any message
–verbose (-v|vv|vvv) Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
–version (-V) Display this application version
–ansi Force ANSI output
–no-ansi Disable ANSI output
–no-interaction (-n) Do not ask any interactive questioncentos
Available commands:
help Displays help for a command
list Lists commands
admin
admin:user:create Creates an administrator
admin:user:unlock Unlock Admin Accountapi
cache
cache:clean Cleans cache type(s)
cache:disable Disables cache type(s)
cache:enable Enables cache type(s)
cache:flush Flushes cache storage used by cache type(s)缓存
在本指南中,我将详细讨论Cache
命令行管理。服务器
首先,经过如下命令行来显示缓存状态:app
缓存状态的结果
缓存存储可能包含其余数据,如服务器缓存。
如下命令将禁用全部缓存类型
若是你想禁用特定的缓存类型,应该输入命令行
它相似于禁用缓存全部类型和特定的缓存类型