<p></p>
<blockquote>
<p>How long will fastly keep cached tiles around before they expire, and new tiles will be fetched from other caches or the rendering server?</p>
</blockquote>
<p>Fastly <a href="https://docs.fastly.com/en/guides/configuring-caching" rel="nofollow">respects the Cache-Control headers</a> that the backend sends. For example <a href="https://tile-openstreetmap-org.global.ssl.fastly.net/5/6/0.png" rel="nofollow">this tile</a> specifies <code>Cache-Control: max-age=111272</code> (plus some other bits), so Fastly will cache it up to 111,272 seconds (~1d6h). That header came from the backend, so we can control that behavior. It's the same header that Squid pays attention to, so I'm sure it has been tweaked already.</p>
<p>We can control the Fastly cache TTL separately from the browser TTL using the shared max-age part of the Cache-Control header.</p>
<p>More info on MDN's <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control" rel="nofollow"><code>Cache-Control</code> page</a>.</p>
<blockquote>
<p>What are options to selectively purge cache contents on fastly in case of vandalism?</p>
</blockquote>
<p>Fastly has a <a href="https://developer.fastly.com/reference/api/purging/" rel="nofollow">cache purge API</a> that we can use through the web interface or via an API once the backend is ready to re-render a corrected tile.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2714#issuecomment-667379060">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOWLX6J7L7FET7EBLTR6M2A7ANCNFSM4O6Q46SA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLJHBMBQ2LJPK3X76YDR6M2A7A5CNFSM4O6Q46SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE7DWK5A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2714#issuecomment-667379060",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2714#issuecomment-667379060",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>