Table of Contents

Class PurgeCacheRequest

Namespace
Cloudflare.NET.Zones.Models
Assembly
Cloudflare.NET.dll

Defines the request payload for a cache purge operation. At least one property must be set.

public record PurgeCacheRequest : IEquatable<PurgeCacheRequest>
Inheritance
PurgeCacheRequest
Implements
Inherited Members

Constructors

PurgeCacheRequest(bool?, IReadOnlyList<string>?, IReadOnlyList<string>?, IReadOnlyList<string>?)

Defines the request payload for a cache purge operation. At least one property must be set.

public PurgeCacheRequest(bool? PurgeEverything = null, IReadOnlyList<string>? Files = null, IReadOnlyList<string>? Prefixes = null, IReadOnlyList<string>? Hosts = null)

Parameters

PurgeEverything bool?

If true, purges all assets in the cache for the zone.

Files IReadOnlyList<string>

A list of URLs to purge from the cache.

Prefixes IReadOnlyList<string>

A list of URL prefixes to purge from the cache.

Hosts IReadOnlyList<string>

A list of hostnames to purge from the cache.

Properties

Files

A list of URLs to purge from the cache.

[JsonPropertyName("files")]
public IReadOnlyList<string>? Files { get; init; }

Property Value

IReadOnlyList<string>

Hosts

A list of hostnames to purge from the cache.

[JsonPropertyName("hosts")]
public IReadOnlyList<string>? Hosts { get; init; }

Property Value

IReadOnlyList<string>

Prefixes

A list of URL prefixes to purge from the cache.

[JsonPropertyName("prefixes")]
public IReadOnlyList<string>? Prefixes { get; init; }

Property Value

IReadOnlyList<string>

PurgeEverything

If true, purges all assets in the cache for the zone.

[JsonPropertyName("purge_everything")]
public bool? PurgeEverything { get; init; }

Property Value

bool?