LogoLogo
  • Welcome
  • Landing in Transparent Edge
  • Sign up process
  • Getting Started
    • Basics concepts
      • Glosary
        • API
        • Brotli Compression
        • Cache-Control
        • Cache key
        • Caching
        • CNAME
        • Cloud Computing
        • Cloud Computing Architecture
        • Cloud Services
        • DASH
        • Data Center
        • Edge Server
        • ETag
        • GSLB
        • HLS (HTTP Live Streaming)
        • HTTP/2
        • Infrastructure as a Service (IaaS)
        • Internet Exchange Point
        • Last-Modified
        • Load Balancing
        • MultiCDN
        • NoSQL (not only SQL)
        • Origin
        • Origin Shield
        • OTT (Over The Top)
        • Platform as a Service (PaaS)
        • PoP (Point of Presence)
        • Private CDN
        • Private Cloud
        • Public Cloud
        • Purge
        • Query String
        • Reverse Proxy
        • RTT (Round-trip Time)
        • SaaS (Software as a Service)
        • SDS (Software Defined Storage)
        • Smooth Streaming
        • Status Code
        • TCP (Transmission Control Protocol)
        • TLS Acceleration
        • TLS (Transport Layer Security)
        • TTFB (Time-to-first-byte)
        • TTL (Time-to-live)
        • Virtual Machine
        • VPS (Virtual Private Server)
        • Web Services
      • Let's start at the beginning
      • Things to consider
      • Houston, we have a problem
      • HTTP, How does it work?
      • Invalidating methods
      • DNS Pointing
      • Log formats
      • Predefined headers
      • Default headers
        • geo_country_code
        • X-Device
        • Vary
        • Cache headers
        • Age
        • TP-Cache
        • True-Client-IP and X-Forwarded-For
      • Forcing No-Cache
      • Architecture
        • Transparent Edge’s IP addresses
        • Locations and PoP
        • Cache layers
      • Cache effectiveness
      • SSL
      • HTTP 5xx Error Codes
      • Features
        • Protection against origin failures
        • Rate Limit
        • Geolocation and geoblocking
        • Prefechting
        • Refetching
        • Fast purging
        • HTTP Redirects
        • Caching static vs. dynamic objects
        • Rewriting of headers
        • Device detection
    • Dashboard
      • Historic
      • Analytics
      • Invalidating content
      • Content invalidation by tags
      • Prefetching Cache
      • Log shipping
      • Provisioning
        • Initial configuration
        • Backends
        • Sites
        • Configuration deployments
        • Network ACLs
        • TLS/SSL Certificates
      • User management
  • Configuration
    • VCL Reference
      • Default Functions
      • VCL Objects
      • Callable Functions
      • Security restrictions
      • Varnish book
    • Network Access Control List
      • Initial configuration
      • Auto generated lists
      • Manage lists via API
    • i3
      • Quality adjustment
      • Cache timing allocation for transformed images
      • Conversion to grayscale
      • Conversion to WebP
      • Blurring
      • Inclusion of graphics in the footer (strip)
      • Automatic resizing
      • Definition of the maximum size (content-length)
    • Transcoding
      • Relaunch or requeue jobs
      • Create a transcode job
      • Get job information
      • Dashboard usage
    • OpenAPI de TransparentCDN
  • Security
    • HTTPS
    • Blocking User-Agent
    • Blocking by IP Address
    • Blocking Requests Geographically
    • Avoiding Hotlinking
    • Bot Mitigation
    • WAF
      • Configuration
      • CAPTCHA
      • Content protected by token
      • Rate limit
    • Anomaly Detection
      • Detection Types
      • Automatic Reactions
      • Detection History
    • Under attack mode
    • Global Whitelists
  • Integrations
    • Wordpress plugin
    • Google Cloud Platform
    • Amazon Web Services
  • GUIDES AND TUTORIALS
    • How to do things
    • Edge Computing
      • ESI Tags
    • Acting on the Query String
    • Working with cookies
    • Making decisions based on HTTP headers
    • Web Application Gateway
    • Configure your servers to send cache headers
    • Caching a version per device
    • True-Client-IP in the origin
    • A/B Testing
    • Routing traffic to different backends
    • JSON Web Tokens
    • Debug codes
    • Streaming logs
    • API
      • Authentication
      • Invalidation
Powered by GitBook
On this page
  • Simple invalidations (PURGES)
  • Soft invalidations (SOFTPURGES)
  • Recursive invalidations (BANS)
  • Simple + Warm Up

Was this helpful?

Export as PDF
  1. Getting Started
  2. Dashboard

Invalidating content

Invalidating (or purging) is as important as caching. Purging removes the object from the cache before it expires or is evicted.

Once an object has been purged, a subsequent request will fetch it from the source instead of from the cache.

Here, we'll explain how to invalidate using four methods:

  • Simple invalidations (PURGES)​

  • Soft invalidations (SOFTPURGES)​

  • Recursive invalidations (BANS)​

  • Simple + Warm Up​

There is another type of invalidation that leverages on tags attached to the objects and is explained here.

Remember that everything that can be done on our dashboard is available via API for automation.

To create an invalidation, log in to our dashboard and go to:

Invalidation -> Purge -> Purge URLs

A wizard will be displayed explaining the different invalidation methods available. You can click on "Advanced mode" to paste a list of URLs directly or complete them using the wizard.

Simple invalidations (PURGES)

This is the standard way of purging an object. A full URL is required, and you can invalidate multiple URLs in a single request, for example:

https://www.example.com/myobject.js

https://www.example.com/myobject.js?v=2.0

https://www.example.com/img/image.jpg

Protocol is required but it does not matter whether it is http or https.

This method immediately removes the object from the cache, and the subsequent request will fetch it from the source (your original backend).

Soft invalidations (SOFTPURGES)

This method purges by complete URL, like the PURGE method, but it has one notable difference: objects are not immediately purged from the cache, instead they are flagged as expired (or stale). The subsequent request will serve the cached object, and a background process will update the object in the cache from the source. If the update succeeds, the old expired object will be replaced.

This method is very useful if you want to protect yourself against backend failures. If your backend has issues and is unable to serve content and you PURGE an object, the CDN will return a 503 error. If you use SOFTPURGE instead of an error, it will return the cached yet expired object (provided that the object is actually in the cache). You decide.

API tip: to transform a purge into a softpurge, add {..., "soft": true} to your payload.

Recursive invalidations (BANS)

This method uses a pattern to invalidate content which is similar to a regular expression.

For example, if you wanted to invalidate all the images in /content/img/, you would request a BAN invalidation with the following pattern:

https://www.example.com/content/img/

You still need to incorporate the protocol and domain.

Be very careful with BANs. A BAN at the root of your site: https://www.example.com/ invalidates the full content of the cache, and all subsequent requests will go directly to your backend.

We encourage you to use other available methods, including invalidation by tags.

Simple + Warm Up

This method behaves in the same way as the PURGE method, the difference is that after the object is invalidated from the cache a request is made to the same URL automatically to warm the cache with a fresh object.

API tip: to transform a purge into a purge + warm up, add {..., "refetch": true} to your payload.

PreviousAnalyticsNextContent invalidation by tags

Last updated 10 months ago

Was this helpful?