How to clear the Varnish cache

Purge the Varnish full-page cache on TurboStack with tscli varnish clear - when to use it, the application alternative, and what to expect afterwards.

Varnish serves a full-page cache of rendered HTML. Clear it when visitors could be seeing stale pages - for example right after a deploy or a content change that the application did not purge on its own.

Clear the cache with the TurboStack CLI

Connect over SSH and run:

tscli varnish clear

This empties the entire full-page cache for the host. The next requests are served from your application until the cache refills, so expect a short performance dip.

Prefer your application's own purge

A full clear is a blunt instrument. Applications that integrate with Varnish (for example Magento) purge only the pages that changed when you update content, which is far less disruptive than emptying everything. Use tscli varnish clear when you need a clean slate, or when the application cannot purge on its own.

After clearing

The first hits are slower while Varnish rebuilds the cache. Warm the important pages by visiting them, or let your sitemap or a crawler do it, before judging performance.