Start here

Getting started
Basics
Domains & Origins
Performance

Configuration
Basics
Conditions
Dictionaries
Domains & Origins
Request settings
Caching
Headers
Responses
Performance
Load balancing
Purging
Custom VCL
Image optimization
Video

Security
Access Control Lists
Monitoring and testing
Securing communications
Security measures
TLS
Web Application Firewall

Integrations
Logging endpoints
Non-Fastly services

Diagnostics
Streaming logs
Debugging techniques
Common errors

Account info
Account management
Billing
User access and control

Reference

    Soft purges

      Last updated January 07, 2020

    Fastly provides a Soft Purge feature that allows you to mark content as outdated (stale) instead of permanently purging and thereby deleting it from Fastly's caches. Objects invalidated with Soft Purge will be treated as outdated (stale) while Fastly fetches a new version from origin. You can purge by URL or by surrogate key using Soft Purge.

    Before using Soft Purge, we recommend you implement one of the following revalidation methods:

    To implement Soft Purge, add a Fastly-Soft-Purge request header (such as Fastly-Soft-Purge: 1) to any single URL or key-based purge.

    To purge the URL www.example.com with Soft Purge, you would issue the following command:

    1
    
    curl -X PURGE -H "Fastly-Soft-Purge:1" http://www.example.com
    

    To purge a surrogate key with Soft Purge, you would issue the following command:

    1
    
    curl -X POST -H 'Fastly-Soft-Purge:1' -H 'Fastly-Key: __API_KEY__' -H 'Accept: application/json' https://api.fastly.com/service/<SID>/purge/<S-Key>
    
    Back to Top