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
10.0.4
Version 10 Support Policy
Feature updates ended 16/06/2024
Security updates until 16/06/2025
13.0.3
Version 13 Support Policy
Feature updates until 14/12/2025
Security updates until 14/12/2026
14.0.4
Version 14 Support Policy
Feature updates ended 02/03/2025
Security updates until 30/05/2025
Readme
Quick Start
Install Package
dotnet add package jcdcdev.Umbraco.CloudflareMediaCache
Get 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