<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Purge on Varnish Cache</title><link>https://www.varnish.org/docs/tutorials/tags/purge/</link><description>Recent content in Purge on Varnish Cache</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 30 Aug 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://www.varnish.org/docs/tutorials/tags/purge/index.xml" rel="self" type="application/rss+xml"/><item><title>Purging content from Varnish</title><link>https://www.varnish.org/docs/tutorials/purge/</link><pubDate>Mon, 30 Aug 2021 00:00:00 +0000</pubDate><guid>https://www.varnish.org/docs/tutorials/purge/</guid><description>&lt;p&gt;The most basic and easy-to-use &lt;em&gt;cache invalidation mechanism&lt;/em&gt; in Varnish is &lt;em&gt;purging&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The idea is that you can perform a &lt;code&gt;return (purge)&lt;/code&gt; in &lt;code&gt;vcl_recv&lt;/code&gt;, and &lt;em&gt;Varnish&lt;/em&gt; will remove the object. This would free up space in the cache after an object lookup.&lt;/p&gt;
&lt;p&gt;This means that the &lt;em&gt;hash&lt;/em&gt; of the object is used to identify it, but &lt;code&gt;return (purge)&lt;/code&gt; would remove it along with its variants. This isn&amp;rsquo;t &lt;em&gt;out-of-the-box&lt;/em&gt; behavior; you won&amp;rsquo;t find it in the &lt;em&gt;built-in VCL&lt;/em&gt;. You need to write some VCL code for it.&lt;/p&gt;</description></item><item><title>Cache invalidation</title><link>https://www.varnish.org/docs/tutorials/cache-invalidation/</link><pubDate>Wed, 20 May 2020 00:00:00 +0000</pubDate><guid>https://www.varnish.org/docs/tutorials/cache-invalidation/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;A good caching strategy not only defines how the content should be cached, but most importantly, how it should be invalidated and evicted from cache.
An object inserted in cache can be served to other clients until it expires, is evicted to make room for other objects, or is invalidated.&lt;/p&gt;
&lt;p&gt;The TTL (Time to Live) of an object define how long an object can be cached. An object&amp;rsquo;s TTL is set when the content is generated (by the backend) or when it&amp;rsquo;s inserted (in Varnish).
The TTL can be set via HTTP caching headers (i.e. &lt;code&gt;Expires&lt;/code&gt; or &lt;code&gt;Cache-Control&lt;/code&gt;) or via VCL.
Either way, Varnish will respect the defined TTLs and evict the object when its Time to Live has expired, making room for fresher content to be inserted in cache.&lt;/p&gt;</description></item></channel></rss>