Table of Contents

Class PurgeCacheOptionsExtension

Namespace
Supabase.Storage.Extensions
Assembly
Supabase.Storage.dll

Translates PurgeCacheOptions into the query string the CDN purge endpoint expects.

public static class PurgeCacheOptionsExtension
Inheritance
PurgeCacheOptionsExtension
Inherited Members

Methods

ToPurgeUrl(PurgeCacheOptions?, string)

Appends the options as a query string to baseUrl, adding the ? separator only when at least one option applies.

public static string ToPurgeUrl(this PurgeCacheOptions? options, string baseUrl)

Parameters

options PurgeCacheOptions

The purge options, or null for none.

baseUrl string

The purge endpoint URL without a query string.

Returns

string

The URL with the options appended.

ToQueryCollection(PurgeCacheOptions)

Transforms the options into a NameValueCollection to be appended to a purge URL. The transformations flag is only emitted when explicitly requested, mirroring the storage-js client, so that the default purges every cached version.

public static NameValueCollection ToQueryCollection(this PurgeCacheOptions options)

Parameters

options PurgeCacheOptions

The purge options to translate.

Returns

NameValueCollection

A query collection carrying the options, empty when none apply.