Magento Tutorials

How to Configure Full-Page Cache in Magento 2

Magento is a well known open source e-Commerce platform. On the other side, it also contains a complex piece of PHP software which makes relatively low performance when compared to other e-Commerce solutions. To improve this situation, Magento uses the concept of Full Page Cache. Full-page Cache improves response time and reduces the load on the server. Without caching, each page might need to run blocks of code and retrieve information from the database.

In this post, I will guide to configure the full-page cache in Magento 2:

  1. On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.
    configuration menu
  2. On the left panel, under Advanced, choose System.
    Magento advanced system
  3. Expand the Full Page Cache section.
    Magento full page cache settings
  4. Set Caching Application to one of the following:
  • Built-in Application
  • Varnish Caching (The Varnish Caching is recommended)
  1. To set the time-out for the page cache, enter the TTL for public content. The default value is 86400
  2. If using Varnish, untick Use System Value. Under Built-in Cache, choose Varnish Cache and then complete Varnish cache Configuration sections as follow:
  • In the Access list field, enter the IP addresses that can purge the Varnish configuration to generate a config file. All multiple entries are seperated by a comma. The default value is “localhost”
  • In the Backend host field, enter the IP address of the backend host that generates config files. The default value is “local host”
  • In the Backend port field, identify the backend port that is used to generates config files. The default value is : “8080”.
  • To export the configuration as a varnish .vcl file, tap the button for the version of Varnish that you use.
    • Export VCL for Varnish 3
    • Export VCL for Varnish 4
      Magento varnish cache
  1. When finish, click Save Config.

 

See also:
How to Add and Configure Multi Language for your Magento Store
How to Configure Wishlists in Magento 2

Is it helpful?

A knowledge craver who always strive to be wiser everyday.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments