---
title: "Purge, invalidation, and prefetch"
description: "How purge by URL, tag, pattern, or all works, when to use soft versus hard purge, surrogate-key limits, tier revalidation, and prefetch for launches on an adult CDN."
url: "https://adultinfra.com/docs/cdn/purge-and-prefetch/"
dateModified: "2026-09-12"
---

[Home](https://adultinfra.com/) / [Docs](https://adultinfra.com/docs/) / Delivery and CDN 

# Purge, invalidation, and prefetch

How purge by URL, tag, pattern, or all works, when to use soft versus hard purge, surrogate-key limits, tier revalidation, and prefetch for launches on an adult CDN.

LAST REVIEWED 2026-09-13

ON THIS PAGE

- [Purge methods](https://adultinfra.com/docs/cdn/purge-and-prefetch/#purge-methods)
- [Tag-based invalidation](https://adultinfra.com/docs/cdn/purge-and-prefetch/#tag-based-invalidation)
- [Soft versus hard purge](https://adultinfra.com/docs/cdn/purge-and-prefetch/#soft-versus-hard-purge)
- [Tier and persistent-cache revalidation](https://adultinfra.com/docs/cdn/purge-and-prefetch/#tier-and-persistent-cache-revalidation)
- [Prefetch for launches](https://adultinfra.com/docs/cdn/purge-and-prefetch/#prefetch-for-launches)
- [Where AdultInfra fits](https://adultinfra.com/docs/cdn/purge-and-prefetch/#where-adultinfra-fits) 

Caching makes content fast and cheap until it must change. **Purge** (invalidation) removes or marks content so the next request refills from origin. On adult platforms the hard cases are takedowns, rights changes, metadata edits, and launches, each with a different urgency and blast radius. Getting invalidation right is as important as getting caching right.

## Purge methods

Method Targets Speed Best for URL purge Exact URLs Fast, precise A few assets, urgent takedowns Tag / surrogate-key purge Every object carrying a tag Fast, broad A title, an uploader, a whole catalogue group Pattern purge URL patterns (wildcards) Broader, less precise Bulk cleanup, path renames Purge all Entire resource Slow, expensive Emergency only; causes stampedes 

Choose the narrowest method that meets the need. `Purge all` on a busy resource is a self-inflicted stampede: every viewer’s next request misses at once and origin takes the full load. It is a last resort, not a routine tool.

## Tag-based invalidation

Tagging is the workhorse for adult catalogues. When the edge fetches an object, the origin returns one or more tags (surrogate keys) identifying the content: a video ID, a channel, a category, a licence group. A later purge by tag invalidates every cached variant of that content across all URLs.

- **Surrogate-key header limits** matter. The header that carries tags has a bounded size and tag count per response; a title with hundreds of tags can be silently truncated, leaving part of the set un-purgeable. Keep tag sets small and hierarchical.

- Tags survive through the shield, so a tag purge reaches every edge holding a copy.

- Design a tagging convention before you need it. Retrofitting tags onto a large catalogue is painful; adding one more tag to new content is trivial.

## Soft versus hard purge

A **hard purge** deletes the cached object. The next request is a miss and goes to origin. That is correct but expensive on hot content.

A **soft purge** marks the object stale and serves it while a single request revalidates origin in the background. Viewers keep getting fast responses, and origin sees one refill instead of a flood.

- Use **soft purge** for updates, metadata edits, and anything hot where a brief stale window is acceptable.

- Use **hard purge** for correctness-critical changes (rights removal, a takedown that must not serve) where even stale bytes are unacceptable.

- Prefer short TTLs plus soft invalidation over long TTLs plus frequent hard purges.

## Tier and persistent-cache revalidation

Invalidation must reach every tier that holds a copy, not the edge alone. A purge that clears the edge but not the shield or a persistent cache will see the object refill from the stale tier and come back. Ensure invalidation propagates edge → shield → persistent cache, and confirm the object is actually gone from each tier before declaring success. Verify with a cache-status probe rather than assuming.

## Prefetch for launches

Cold caches hurt most at the moment of maximum demand. **Prefetch** warms content ahead of time: before a launch, a promotion, or a scheduled release, instruct the edge to fetch the objects so the first real viewer lands on a warm cache.

- Prefetch the hot set: the first segments of the titles you are promoting, the new landing page, the manifest. Do not prefetch the entire catalogue.

- Prefetch into the shield and the target regions, in the order viewers will request.

- Combine with origin capacity headroom for the actual spike; prefetch reduces misses, it does not eliminate the first fill.

- Re-run prefetch after any hard purge of the promoted set.

## Where AdultInfra fits

AdultInfra designs invalidation that reaches every tier without causing stampedes, verifies soft and hard purge behaviour, and warms hot content before launches so the spike lands on a warm cache. Bring one hostname and the content lifecycle you need to control and [talk to us](https://adultinfra.com/contact/).

**Need this configured for your platform?** [Get a test plan](https://adultinfra.com/contact/) and an engineer will map the resource, cache, and delivery design to your workload.

```json
{"@context":"https://schema.org","@graph":[{"@type":"TechArticle","headline":"Purge, invalidation, and prefetch","description":"How purge by URL, tag, pattern, or all works, when to use soft versus hard purge, surrogate-key limits, tier revalidation, and prefetch for launches on an adult CDN.","url":"https://adultinfra.com/docs/cdn/purge-and-prefetch/","dateModified":"2026-09-13","keywords":"CDN purge, cache invalidation, surrogate key purge, CDN prefetch, cache revalidation","author":{"@id":"https://adultinfra.com/#organization"},"publisher":{"@id":"https://adultinfra.com/#organization"},"inLanguage":"en"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://adultinfra.com/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https://adultinfra.com/docs/"},{"@type":"ListItem","position":3,"name":"Purge, invalidation, and prefetch","item":"https://adultinfra.com/docs/cdn/purge-and-prefetch/"}]}]}
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://adultinfra.com/#organization","name":"AdultInfra","url":"https://adultinfra.com","logo":"https://adultinfra.com/favicon.svg","description":"Luxembourg-based specialist infrastructure for adult platforms.","slogan":"Already behind the adult internet.","areaServed":"Worldwide","knowsAbout":["Adult video CDN","Porn tube site infrastructure","Adult live-cam streaming","Creator subscription platforms","Byte-range video caching","Origin shielding","Player quality of experience","DDoS protection","GPU infrastructure","Adult-capable AI inference"],"location":{"@type":"Place","name":"Luxembourg","address":{"@type":"PostalAddress","addressCountry":"LU"}},"contactPoint":{"@type":"ContactPoint","contactType":"sales","url":"https://adultinfra.com/contact/"}},{"@type":"WebPage","@id":"https://adultinfra.com/docs/cdn/purge-and-prefetch/#webpage","url":"https://adultinfra.com/docs/cdn/purge-and-prefetch/","name":"Purge, invalidation, and prefetch","description":"How purge by URL, tag, pattern, or all works, when to use soft versus hard purge, surrogate-key limits, tier revalidation, and prefetch for launches on an adult CDN.","isPartOf":{"@id":"https://adultinfra.com/#website"},"about":{"@id":"https://adultinfra.com/#organization"},"primaryImageOfPage":{"@type":"ImageObject","url":"https://adultinfra.com/og-default.png"},"inLanguage":"en","mainEntity":{"@id":"https://adultinfra.com/docs/cdn/purge-and-prefetch/#article"},"dateModified":"2026-09-13"},{"@type":"WebSite","@id":"https://adultinfra.com/#website","url":"https://adultinfra.com","name":"AdultInfra","description":"Luxembourg-based specialist infrastructure for adult platforms.","publisher":{"@id":"https://adultinfra.com/#organization"},"inLanguage":"en","potentialAction":{"@type":"ContactAction","target":"https://adultinfra.com/contact/"}}]}
```
