14 Oct 2020 IN Magento

How to clear the cache in Magento 2

Every hosting server has a particular area for Cache. This space helps to increase the page loading speed and stores the web pages through browsers. Apart from this, it will also reduce the need in the situation of heavy traffic.

Among all benefits, use of cache delivers faster performance is most essential. If you want to reflect changes in the frontend, you need to refresh the cache on the website.

If you want the fastest way to delete cache in Magento 2, have a look at two different methods for Magento 2 clear cache.

Method 1: Clear Magento 2 cache via Admin Panel

  • Navigate to Admin Panel >> System >> Cache Management
  • Select the Cache Type blocks that are assigned Invalidated status. You may select “All” if you don’t know what to refresh.
  • Set the “Refresh” action and click on the “Submit” button.
  • Additionally, you may use “Flush Magento Cache” or “Flush Cache Storage” buttons.
  • Flush Magento Cache: Refresh the cache in the back-end and inner cache with Magento tag.
  • Flush Cache Storage: Refresh cache of all Magento stores sharing one cache storage, though based on different servers.

Method 2: Clear Magento 2 cache via command line

You can refresh cache manually using the below commands from the command line tool.

  • Enable the cache: php bin/magento cache:enable
  • Disable the cache: php bin/magento cache:disable
  • Flush the cache: php bin/magento cache:flush
  • Clean the cache in the website: php bin/magento cache:clean

To clean specific cache types, you need to specify the types, e.g.: config, layout, block_html, collections, reflection, db_ddl, eav, etc.

For immediate assistance with any type of website design and eCommerce development related requirements, connect with us now!