Clear Cache in Magento 2
The cache is the biggest issue when you develop so you need to know all the possible ways of cleaning it.
There are 3 way to clean the cache (similar to Magento 1):
-
From the backend (Admin):
-
Through command-line (CLI) tool:
# in your Magento root folder # the php from the beginning of the line can be omitted # -- cache:clean deletes the cache storage php bin/magento cache:clean # -- cache:flush will wipe out everything php bin/magento cache:flush
-
Manually removing the cache files:
# from magento root directory in command line run the command rm -rf var/cache/*
You can also check the cache status
First of all, let show cache status by the following command line:
php bin/magento cache:status
Result of cache status
Current status:
config: 1
layout: 1
block_html: 1
collections: 1
reflection: 1
db_ddl: 1
eav: 1
config_integration: 1
config_integration_api: 1
full_page: 1
translate: 1
config_webservice: 1