top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Difference between cache clear and cache flush in magento 2?

+1 vote
473 views

In magento 2 we use both commands for cache i.e cache:clear and cache:flush
Please let me know the difference between both the commands.

posted Feb 23, 2018 by Vishi Gulati

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

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.

Source: http://devdocs.magento.com/guides/v2.0/config-guide/cli/config-cli-subcommands-cache.html

answer Feb 24, 2018 by Salil Agrawal
...