In Magento 2 we have 2 commands
php bin/magento cache:flush
php bin/magento cache:clean
What's exact difference between them? I'm generally using cache:flush. I never used cache:clean. So, when to use which command & in which situation?
|
In Magento 2 we have 2 commands
What's exact difference between them? I'm generally using |
||||
|
|
|
To purge out-of-date items from the cache, you can clean or flush cache types: Cleaning a cache type deletes all items from enabled Magento cache types only. In other words, this option does not affect other processes or applications because it cleans only the cache that Magento uses. Disabled cache types are not cleaned. Flushing a cache type purges the cache storage, which might affect other processes applications that are using the same storage. Flush cache types if you’ve already tried cleaning the cache and you’re still having issues that you cannot isolate. |
|||
|
|
|
php bin/magento cache:flush Removes all items in the default Magento cache (var/cache) and the var/full_page cache that have a Magento tag. php bin/magento cache:clean This command removes all items in the cache. This is the equivalent of deleting the entire contents of the cache folder on the server.If your system uses an alternate cache location, any cached files used by other applications will be removed. |
|||||||||
|
|
Using Supported types:
|
|||
|
|