Cache Purge

The Purge feature allows you to remove cached content from the Kontenum CDN so that the next request will fetch fresh content directly from your origin.

Purge is useful when you:

  • Update files (CSS, JS, images, media)
  • Deploy a new version of your application
  • Need to immediately invalidate outdated or incorrect content

How Purge Works

When a URL is purged:

  1. Kontenum removes the cached object from all edge locations
  2. The next client request triggers a new fetch from origin
  3. The refreshed content is cached again based on your caching rules

Purge operations are safe and do not affect your origin data.


How to Trigger a Purge

1. Purge via Console (Web UI)

You can manually submit a purge request through the Kontenum Console. This is the fastest way to purge individual URLs during development or small updates.

2. Purge via API

For automation and CI/CD workflows, purge can also be triggered using the Kontenum API.

Using the API allows you to:

  • Purge content during deployments
  • Integrate purge into build pipelines
  • Bulk purge programmatically

Purge Form Fields

URL (Required)

The URL field specifies which cached content should be removed.

Example:

https://example.com/path/to/file.css

Automatic Wildcard Purge

Kontenum automatically applies wildcard purging based on the URL you provide.

Example:

https://mycdn.example.com/assets/

This will purge:

https://mycdn.example.com/assets/*

All cached files under the /assets/ path will be removed.

⚠️ Be careful when purging high-level paths, as this may invalidate a large number of cached objects.


Origin Header (Optional)

The Origin Header field allows you to purge cached content selectively based on the origin domain used when fetching assets.

This value is sent as the HTTP Origin header when the CDN performs cache validation.

Example:

www.kontenum.com

When to Use Origin Header

Use this field when:

  • Multiple domains share the same CDN delivery domain
  • You want to purge content fetched from a specific origin only
  • You are hosting multi-tenant or multi-origin configurations

If left empty, the purge applies to all origins associated with the URL.


Best Practices

  • Purge specific paths or files instead of full domains whenever possible
  • Use API-based purge for automated deployments
  • Avoid frequent full-path purges on high-traffic sites
  • Combine purge with proper cache-control headers for optimal performance

Common Use Cases

Scenario Recommended Action
Update a single file Purge exact file URL
Update a folder Purge folder path (wildcard)
Multi-origin setup Use Origin Header
CI/CD deployment Use Purge API

Notes

  • Purge affects cached content only, not origin storage
  • Newly fetched content will respect your site caching rules
  • Purge requests are processed globally across all CDN edge locations

If you need help with advanced purge scenarios or API usage, refer to the API documentation or contact support team.