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
  • Cache Key
  • Single or PURGE invalidations
  • Recursive or BAN invalidations

Was this helpful?

Export as PDF
  1. Getting Started
  2. Basics concepts

Invalidating methods

PreviousHTTP, How does it work?NextDNS Pointing

Last updated 2 years ago

Was this helpful?

There are two methods for invalidating content: PURGE, which is a single invalidation that invalidates one particular object; and BAN, which is a recursive invalidation that can invalidate more than one object at a time.

Cache Key

A cache key is how the CDN saves an object to its cache. By default, the cache key is made up of:

[Host header] + [url] + [Query Stream]

From there, we can complicate the cache key as much as we wish, adding more elements to save more versions of the same object. Let’s look at an example:

https://www.transparentcdn.com/index.html?param=1

https://www.transparentcdn.com/index.html?param=2

For Transparent Edge—and in general for any other system of HTTP caches—these are distinct objects. Therefore, even if the first one is cached, it will download again to the origin when the second one is requested.

We can use the header to modify the behavior and save more versions of the same object. For instance, with an object like this:

https://www.transparentcdn.com/index.html?param=1

And a Vary header like this:

Vary: User-Agent

We can make the CDN cache save as many objects as the number of user-agents requesting them.

This example in particular makes the efficiency of the cache decline drastically, which is why we don’t recommend having a Vary header with a user-agent or cookie value. It could be interesting, however, to have an value, value, to be able to serve different versions of an object depending on the type of device requesting the resource.

Single or PURGE invalidations

This kind of invalidation lets you invalidate one particular object in the cache. To do so, you must be sure to enter the full URL with all the parameters included.

If you have modified the behavior of the cache-key with the Vary header, you typically shouldn’t have to worry. This kind of invalidation should invalidate all the existing versions of that particular object.

One type of PURGE invalidation is known as a SOFTPURGE, which is much less aggressive.

Recursive or BAN invalidations

BAN invalidations let you invalidate cache content recursively, by sending a blacklist and telling the cache to invalidate any object that matches it. For instance, we can tell it to invalidate https://www.transparentedge.eu/images/. This would invalidate any object that matches this URL, such as:

https://www.transparentedge.eu/images/image1.png or https://www.transparentedge.eu/images/2020/02/22/index.php.

These invalidations are incompatible with the refetching feature.

This kind of invalidation can be very dangerous in some cases. For instance, if you invalidated the website https://www.transparentedge.eu/ recursively, you could run into serious problems on your origin platform, as there would soon be a flood of traffic coming from all your users. Use it wisely.

To do an invalidation from our, just follow this.

To do an invalidation from our, just follow this.

Remember that everything you can do from our you can do from our.

Vary
X-Device
dashboard
guide
dashboard
guide
dashboard
API