Cache is a separate area of your hosting server, which is used to store web pages through browsers to speed up the load processes. To solve the issue with updates made on your website content the cache should be refreshed. Thus each time you make changes to your online store you need to refresh the cache to make them visible on the frontend.
Everyone looks for a solution that allows for fast and effortless cache deleting in Magento 2. Here are the simplest methods to clear cache.
*‘Flush Magento Cache’: allows for refreshing cache you see in the backend and inner cache with Magento tag;
*‘Flush Cache Storage’: allows for refreshing cache of all Magento stores sharing one cache storage (like Redis, magento Memcache), though based on different servers.
!If you run one of the cache storages together with Magento-based websites of other merchants, having refreshed it like that, you’ll clear their cache too!
Magento 2 allows you to clear cache manually via the command line. To delete cache manually you may need the next commands:
php bin/magento cache:enable
php bin/magento cache:disable
php bin/magento cache:flush
php bin/magento cache:clean
To clean particular cache types, you need to specify (comma-separated) the types, e.g.: config, layout, block_html, collections, reflection, db_ddl, eav, etc.
You can enable Full Page Cache option to enhance your website performance and speed up pages load:
Built-in Cache setting is stated to be from 4 to 9 times faster than Varnish Cache.
Moreover, you can implement the Full Page Cache Warmer for Magento 2. The module allows for speeding up your online store due to timely cache warming when it’s required. Besides, you can exclude separate pages from warming and enable the auto-update cache after changes.
To remove played out items from your website you can run both the commands: clean and flush Magento 2 cache. However, you need to learn the difference:
|Clean cache||Flush cache|
|It deletes all enabled cache types from Magneto 2. Thus, disabled cache types are not cleaned.||It cleans all the cache types collected in a storage, which may affect other processing applications that run the same cache storage, e.g.: other websites (even of other owners).|
If you need to clear particular cache types, which haven’t been automatically assigned Invalidated status, you need to return to the Cache Management menu to make the next settings: