Skip to main content

Magento 2: cache clean vs cache flush

Published 1 min readMarkdown

During the development we constantly use the Magento feature to clean or flush the cache, but do you know the difference? Check out this difference based on DevDoc.

php bin/magento cache:clean

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.

php bin/magento cache:flush

Flushing a cache type purges the cache storage, which might affect other processes applications that are using the same storage.

Reference: DevDocs Manage the cache

About the author

  • I work at LeSite as Technology Director, where I’m responsible for lead the technical team to building innovative products.

    My passion for building software and sharing knowledge brought me to speak in over 14 conferences and create 21 projects used for more than 20,000 developers in the world. Now, I’m focused on helping merchants bringing innovation and technology strategy to their e-commerce ecosystem using the Magento 2, Adobe Commerce, Shopify Plus and other platforms.

No comments yet. Be the first to comment.

More from this blog