StoredServiceWorkerRouterRule Class

A rule of the static routing API (https://w3c.github.io/ServiceWorker/#dictdef-routerrule) of a StoredServiceWorker.

public sealed class StoredServiceWorkerRouterRule

Constructors

NameDescription
StoredServiceWorkerRouterRule()

StoredServiceWorkerRouterRule()

  • Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public StoredServiceWorkerRouterRule()

No documentation is available.

Properties

NameDescription
CacheNameGets the name of the cache of a cache source, or null to look up every cache.
ConditionGets the condition of the requests handled by the rule.
SourceGets the source: network, cache, fetch-event or race-network-and-fetch-handler.

Gets the name of the cache of a cache source, or null to look up every cache.

public string? CacheName { get; init; }

Property value

string?

Gets the condition of the requests handled by the rule.

public required StoredServiceWorkerRouterCondition Condition { get; init; }

Gets the source: network, cache, fetch-event or race-network-and-fetch-handler.

public required string Source { get; init; }

Property value

string