Magento 2 Cache and Page Cache Overview
When you first install your Magento store, the file system caching is enabled by default.
To change it, you can edit the
app/etc folder. Find the
cache_types and change the value of the array_key value (1 or 0).
The settings should look like this:
'cache_types' => array ( 'config' => 1, 'layout' => 1, 'block_html' => 1, 'collections' => 1, 'db_ddl' => 1, 'eav' => 1, 'full_page' => 0, 'translate' => 1, 'config_integration' => 1, 'config_webservice' => 1, 'config_integration_api' => 1, ), );
Page Cache Overview
In Magento, “page cache” means caching the entire page.
You can use the
Default Cache which stores cache files on
Another option is to use Varnish which Magento recommended.
Cacheable and uncacheable pages
By default, all pages are cachable.
If you don’t want a page to be cached. You can add the
cacheable="false" into the layout in any block.
- If any block in a layout is designated as uncacheable, the entire page is uncacheable.
Meaning if you add
default.xmllayout, your entire store will have no cache at all.
- Only HTTP GET and HEAD requests are cacheable. For more information about caching, see RFC-2616 section 13.
Enjoyed the tutorial? Spread it to your friends!
People also searched for
- magento cache
- page cache