Varnish Cache is a web application accelerator designed for content-heavy dynamic websites - like Magento 2 stores.

It is also known as caching HTTP reverse proxy. Varnish is built to work with HTTP protocol exclusively, whether the store loads on Nginx or Apache webserver.

In simple language:

Varnish sits between the user and original database, stores the cacheable assets, and server the content on behalf of the database. Varnish serves the content extremely fast from the cache memory. As a result, content loads quickly, and website pages open faster.

How it all works?

When the user clicks on a link to open a page, the browser sends the request to the webserver. The webserver finds the data need to open the page (code, images, videos etc.) and send it to the browser in a packet.

A big part of the content is the same for every page and stored in memory. However, the content that changes page to page is fetched directly from the database.

So, Varnish saves a copy of the content, and when the user sends the request to load the content, it server the content from his memory. This speed up the entire process.

What if you update the content?

Varnish cache expires after a certain duration of time itself. The new cache with the updated content is formed, and then it also gets deleted after some time. The process is automatic.

However, if you like, you can clear the cache manually from the Breeze dashboard itself.

With Breeze, you can enable the varnish cache and improve your store performance. It already comes with the server, and you can disable/enable it from the Tool section.
Was this article helpful?
Thank you!