Magento 2 Cache Clean & Cache Flush
- The Magento Cache Clean deletes all the enabled Magento-related caches. The clean cache does not clean other parts of the server which are not related to Magento.
- The Magento Cache Flush cleanses cache storage. It will impact other parts of the storage which is a part of the same storage.
Difference Between Magento 2 Cache Clean & Cache Flush
- Cache clean does not delete the items which are stored in the cache without proper tags.
- flush the cache if the cache clean does not reflect the changes at the front end.
- Flush cache rubs out every item from the same cache storage. So if the same cache storage is used by multiple Magento instances or if the same database as for the cache is used to store sessions, then that will also be erased.
Commands for cache clean and Cache flush
For Cache clean, run the following command:
| 1 | php bin/magento cache:clean |
For Cache flush, run the following command:
| 1 | php bin/magento cache:flush |