Commands for How to Flush, Enable, Disable Cache Command Line in Magento 2
This is very common issue/problem for those developer who are using Magento 2. How to Flush, Enable, Disable Cache Command Line in Magento 2. Magento 2 has 12 types of cache by default in admin. There are 5 simple command to manage cache in command line. In this post I will show you step by step each command line.
1. View the cache status Run this Command
1 |
php bin/magento cache:status |
2. Clean Cache command line
1 |
php bin/magento cache:clean |
3. flush cache storage used by cache types(s) command line.
The cache storage may contain additional data such as server cache.
1 |
php bin/magento cache:flush |
4. Disable Cache command line
The following command will disable all cache types.
1 |
php bin/magento cache:disable |
If you would like to disable specific cache type, should type command line.
1 |
php bin/magento cache:disable CACHE_TYPE |
5. Enable Cache command line
It is similar to Disable cache all types and specific cache type.
1 |
Enable all cache typesphp bin/magento cache:enable |
Enable specific cache type
1 |
php bin/magento cache:enable CACHE_TYPE |
Example
1 |
php bin/magento cache:enable layout |
[paypal-donation]
OnceBuilder CMS is easier…