What is Cache? Cache is a location where frequently accessed data can be stored in a system. The major reason for using cache is to deliver faster performance. Magento’s cache management system allows you to store frequently accessed data in cache for improved performance. Since Magento is a database-driven platform, utilizing cache can significantly increase the speed by caching data that would normally require numerous queries to various database tables to assemble.
Click HERE to see if training is right for your business and receive a free 'Keep Calm and Clear Cache' t-shirt. (some restrictions apply)
Where is Cache in Magento? Magento cache is located in the var/cache directory off the root of your store and can be managed via the admin from the System>Cache Management menu option.
What are the different types of Cache in Magento? Magento has a dozen different cache types. These are:
- Configuration
- Layouts
- Blocks HTML output
- Collection Data files.
- Database DDL operations
- EAV types and attributes
- Page Cache
- Integrations Configuration
- Integrations API
- Target Rule
- Translations
- Web Services Configuration
Each Cache type is used differently by the system but some easily recognized items would include layouts and HTML blocks.
The Power of Full-Page Caching Magento 2.0 makes Full-Page Caching available for both the Community and Enterprise versions. Previously, with 1.x versions of Magento, this feature was only available on the Enterprise version or third party modules. Full-Page Cache allows websites to quickly serve category, product, and CMS pages to people visiting the site. Some pages that are never cached include account pages, cart pages, and checkout pages.
What are the different Magento cache management options? During the course of managing your website, adding products, using widgets or building CMS pages, you may notice the changes are not updating on your site.
Within the System>Cache Management section you can manage different areas of cache types via the available buttons. They are:
Flush Magento Cache - Removes all items in the default Magento cache (var/cache), according to their associated Magento tags. Flush Magento Storage - Removes all items from the cache, regardless of Magento tag. If your system uses an alternate cache location, any cached files used by other applications are removed in the process. This option flushes everything. Flush Catalog Image Cache - Removes all automatically resized and watermarked catalog images that are stored at: media/catalog/product/cache. If recently uploaded images aren't reflected in the catalog, try flushing the catalog and refreshing your browser. Flush JavaScript/CSS Cache - Removes the merged copy of JavaScript and CSS files from the cache. If recent changes to the stylesheet or JavaScript aren't reflected in the store, try flushing the JavaScript/CSS cache and refreshing your browser. Flush Static Files Cache - Removes preprocessed view files and static files.
In addition to the button options for clearing cache, you have the option to enable or disable certain cache types, and to flush specific cache types.
Caching is Better Understanding how Magento Cache works and utilizing it, like the Full-Page Cache option available in Magento 1.x Enterprise versions and both Community and Enterprise Magento 2.x versions, will ensure your site delivers improved speed and a better customer experience.