Features
Automatic
Simply configure your Zone ID and API Token!
Caching
Adds an ETag for all media requests with full Image Cropper query string support.
Purge Modes
- All - Purges the entire cache (All Cloudflare plans)
- Prefix - Purges the media item (Cloudflare Pro & Enterprise)
Versions
13.0.7
Version Support Policy
Feature updates until 14/12/2025
Security updates until 14/12/2026
This is a Long Term Support (LTS) version
15.0.2
Version Support Policy
Feature updates ended 14/08/2025
Security updates until 14/11/2025
16.0.2
Version Support Policy
Feature updates until 12/03/2026
Security updates until 12/06/2026
Readme
Quick Start
Install Package
dotnet add package jcdcdev.Umbraco.CloudflareMediaCacheGet Cloudflare Zone ID & API Key
You will need a Cloudflare Zone ID and API Key to use this package.
- Zone ID: Find your Zone ID
- API Key: Create an API Key
Note: The API Key should have the following permission:
- Zone.Cache Purge
Configuration
Add the following section to your appsettings.json:
{ "Cloudflare": { "Media": { "Cache": { "ZoneId": "ZONE_ID", "ApiToken": "API_TOKEN", "Enabled": true, "Mode": "All", "MaxAge": 2592000 } } }}Options
| Option | Description |
|---|---|
ZoneId |
The Cloudflare Zone ID |
Key |
The Cloudflare API Key |
Enabled |
Whether to enable functionality |
Mode |
The cache mode (All, Prefix) |
MaxAge |
The max-age for cache headers (seconds) |
Contributing
Contributions to this package are most welcome! Please visit the Contributing page.
Acknowledgements (Thanks)
- LottePitcher - opinionated-package-starter
- jcdcdev - jcdcdev.Umbraco.PackageTemplate