SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH SPECIAL OFFER: ENJOY 3 MONTHS OF SHOPIFY FOR $1/MONTH

How to clear cache in magento2

In many cases when you change the configuration on your store but don’t see any changes. This may be due to the cache on your Magento store. So what do you need to do to fix this situation? This article will help you to solve that problem.

First, we need to understand cache in Magento includes 12 types:

cache type in magento 2

To clear cache on magento 2 we have 2 ways:

  • use cache manager in the Admin Panel.
  • use the command line.

1. Clean cache by Admin Panel:

You just need to access the admin following the instructions and perform the cache as you like Admin Panel -> System -> Cache Management the clean cache which you want. You can see the image below:

Clean cache but command line:

First go to your Magento root directory and open a command prompt. Then you run the commands according to your needs.

  • The command clears cache:
php bin/magento cache:clean
php bin/magento c:c (Abbreviation form)

After running, check your store again.

To check memory status, run the following command:

php bin/magento cache:status

And result:


Current status:
config                : 1
layout                : 1
block_html            : 1
collections           : 1
reflection            : 1
db_ddl                : 1
eav                   : 1
config_integration    : 1
config_integration_api: 1
full_page             : 1
translate             : 1
config_webservice     : 1
  • Clean Cache by command line (SSH):
php bin/magento cache:clean
  • To turn off command line cache
php bin/magento cache:disable
php bin/magento cache:disable CACHE_TYPE (To turn off a specific type of buffer)

Example:

php bin/magento cache:disable config (Turn off Magento cache for configuration)
  • We can use the same command to turn on the cache as well:
php bin/magento cache:enable
php bin/magento cache:enable CACHE_TYPE (To turn on a specific type of buffer)

Thank you for watching. Hope the article will help you. Good bye and see you again.