jcdcdev.Umbraco.CloudflareMediaCache 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package jcdcdev.Umbraco.CloudflareMediaCache --version 0.1.0
NuGet\Install-Package jcdcdev.Umbraco.CloudflareMediaCache -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="jcdcdev.Umbraco.CloudflareMediaCache" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add jcdcdev.Umbraco.CloudflareMediaCache --version 0.1.0
#r "nuget: jcdcdev.Umbraco.CloudflareMediaCache, 0.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install jcdcdev.Umbraco.CloudflareMediaCache as a Cake Addin
#addin nuget:?package=jcdcdev.Umbraco.CloudflareMediaCache&version=0.1.0

// Install jcdcdev.Umbraco.CloudflareMediaCache as a Cake Tool
#tool nuget:?package=jcdcdev.Umbraco.CloudflareMediaCache&version=0.1.0

jcdcdev.Umbraco.CloudflareMediaCache

Umbraco Version NuGet GitHub license Downloads

Features

  • Automatically purge Cloudflare cache when media saved
    • Purge by prefix (Cloudflare Pro & Enterprise)
    • Purge all (All Cloudflare plans)
  • Adds cache headers when serving media
    • Respects image cropper

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.

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 read the Contributing Guidelines.

Acknowledgments (thanks!)

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
14.0.0 77 6/4/2024
14.0.0-alpha0002 63 6/4/2024
14.0.0-alpha0001 73 5/25/2024
13.0.0 114 5/25/2024
13.0.0-alpha0001 62 5/25/2024
12.0.0 68 5/25/2024
12.0.0-alpha0001 63 5/25/2024
10.0.0 68 5/25/2024
10.0.0-alpha0001 61 5/25/2024
0.1.1 123 5/12/2024
0.1.0 70 5/12/2024