Skip to content
Start here

Variants

Get variants setting
client.Cache.Variants.Get(ctx, query) (*VariantGetResponse, error)
GET/zones/{zone_id}/cache/variants
Change variants setting
client.Cache.Variants.Edit(ctx, params) (*VariantEditResponse, error)
PATCH/zones/{zone_id}/cache/variants
Delete variants setting
client.Cache.Variants.Delete(ctx, body) (*VariantDeleteResponse, error)
DELETE/zones/{zone_id}/cache/variants
ModelsExpand Collapse
type CacheVariant struct{…}

Variant support enables caching variants of images with certain file extensions in addition to the original. This only applies when the origin server sends the 'Vary: Accept' response header. If the origin server sends 'Vary: Accept' but does not serve the variant requested, the response will not be cached. This will be indicated with BYPASS cache status in the response headers.

ID CacheVariantID

ID of the zone setting.

ModifiedOn Timeoptional

Last time this setting was modified.

formatdate-time