<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ykey on Varnish Cache</title><link>https://www.varnish.org/docs/tutorials/tags/ykey/</link><description>Recent content in Ykey on Varnish Cache</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 20 May 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://www.varnish.org/docs/tutorials/tags/ykey/index.xml" rel="self" type="application/rss+xml"/><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>