Introducing Soft Purge, a more efficient way to mark outdated content
We aim to give our customers complete control over how their content is served. Instant Purge lets you remove content across our entire global network in milliseconds, and our real-time analytics and historical stats give you deeper visibility into how your site or application performs.
Today, we’re excited to announce Soft Purge, a new purging feature that allows you to easily mark content as outdated (stale) instead of permanently deleting it from Fastly’s caches. With Soft Purge, you have the same real-time purging options that you get with Instant Purge: purge by URL or by surrogate key.
Instant Purge vs. Soft Purge
Any time you use our Instant Purge functionality, the content is immediately removed across the entire cache network. This means you don’t really have a backup plan if your origin server is unavailable or if it’s responding slowly.
Now, using Soft Purge in conjunction with Cache-Control extensions stale-if-error and stale-while-revalidate, you can serve stale content to your end users and ensure their experience with your site and application won’t be negatively impacted in the case of unavailable origin servers or slow performance.
News homepage use case
A great example of leveraging Soft Purge with stale-while-revalidate is the front page of a news website. Responsiveness and load times are extremely important factors in retaining readers online, since users expect web pages to load immediately. If a news site uses Soft Purge instead of Instant Purge, then their stale content becomes available for use with the stale-while-revalidate feature. Highly trafficked, frequently requested content on a news homepage can always be available from cache, and therefore accessible to end users per the site’s stale-while-revalidate Time To Live (TTL) settings.
To start using Soft Purge, include a “Fastly-Soft-Purge” request header field in your purges. For more detailed information on using this feature, read the Fastly guide to purging content. Learn about how others are using Fastly to improve end-user experiences on Fastly’s Community forum.