Technology is increasing the capability of smaller businesses to sell higher volumes online, but this can lead to one major problem – a slow website, and customers these days have zero patience
Forget waiting minutes for a site to load, most customers will only hang around online for several seconds before leaving your site and never coming back. A slow site means slow sales. That’s why it’s so important to have a good load speed! A speedy eCommerce store will help you rank better on search engine results, and customers will continue to buy online from you.
A fast site will convert better than one that takes only a few seconds longer to load.Click to tweet
How Magento 2 Cache Differs
This is where Magento’s Cache kicks-in. When someone visits your eCommerce store Magento caches it, making subsequent requests super speedy. The release of Magento 2 in late 2015 supercharged the platform to offer 50% faster load times to make your customers happy and improve conversion rates.
We already have covered Magento caches in Anatomy of Magento Cache and Understanding Full Page Cache in Magento Enterprise but Magento 2 Cache differs a lot. Magento 2 is a brand new platform so it is faster, less resource-hungry, and better optimized for higher loads than Magento 1.X
Enterprise and Community Platforms
For Magento 1.x only Enterprise Edition had the Full Page Cache integration. Magento Community Edition was left out of this special feature. Merchants on Magento CE were required to us paid extensions to accomplish the same performance.
This changed with the release of Magento 2.0! The platform now offers a lot of new performance enhancements and features pre-integrated for both Community and Enterprise Editions. These features include: native support for Full Page Cache, Varnish, Redis, Nginx, Content Delivery Networks, CSS Compilation and RequireJS.
Magento is a database driven platform. That means it uses multiple queries to get data from database tables. This requires time to compile results. Using cache avoids subsequent server side requests and delivers web pages faster. Magento is equipped with following type of caches:
|Configuration||Magento gathers configuration from all module/config.xml files, merges it, and saves the merged result to the configuration cache. This cache also contains website and store scope-specific settings stored in file system and database.|
|Layout||Compiled page layouts (contains, layout.xml components from all components).|
|Block HTML Output||HTML page fragments per block.|
|Collections Data||Results of database queries. Magento cleans up this cache automatically, but third-party developers can put any data in any segment of the cache.|
|DDL||Database schema. Flush this cache type after you make custom changes to the database schema.|
|Entity attribute value (EAV)||Metadata related to EAV attributes (e.g. store labels, links to related PHP code, attribute rendering, search settings etc.).|
|Page cache|| Generated HTML pages. Flush this cache type after making code level changes that affect HTML output.
|Reflection||Removes a dependency between the Webapi module and the Customer module.|
|Translations||Merged translations from all modules.|
|Integration configuration||Compiled integrations.|
|Integration API Configuration||Compiled integration APIs.|
|Web services configuration||Web API structure.|
Magento 2 Cache Management
Magento 2 Cache Management module is located under Admin Sidebar -> System -> Cache Management (Under Tools section) and can be used to Manage various types of caches. Along with buttons for clearing cache, this page also gives option to enable or disable, and to flush specific cache types.
This screen also shows status of each Cache Type and the one’s marked as “Invalidated” should be flushed to Generate newer cache.
Caches become invalidated when Magento detects a change in original and cached version of an entity. For example, when you change the HTML output of a page, you will receive a notification about invalidated cache in Admin with a link to the Cache Manager so you can refresh the Page Cache.
The purpose of Flush Magento Cache is to flush entire Magento Cache and regenerate it again on very first load.
Below the core cache types, we also have some additional Cache Management actions
- Catalog Images Cache – Resized Product images are saved in this Cache; Flush Catalog Images Cache will remove all the catalog images that are stored in: media/catalog/product/cache directory. This can be flushed in case if recent images aren’t appearing in catalog, or to remove outdates images that are no longer used.
- Static Files Cache – All Static Files cache can be flushed from here
Improve your Performance with Magento 2’s Cache
As you can see, Caching is vital part of your website and should be enabled on Magento stores at all times for improved performance and ROI! I hope after reading this article you will find Magento 2 Cache Management a piece of cake.