capabilities.work

Add Cache Settings

A 3-step recipe with Fastly. We can help you get access.

Recipe · 3 steps

Add Cache Settings

with Fastly

Clone a version, add a cache settings rule, and activate the clone.

  1. Clone the supplied version into a new editable draft version.
  2. Create the cache settings rule on the cloned version.
  3. Activate the cloned version so the cache settings go live.
What you'll need to have ready
  • apiToken: The Fastly API token used to authenticate requests.
  • serviceId: The alphanumeric identifier of the service.
  • versionId: The version number to clone.
  • cacheSettingsName: A name for the cache settings rule.
  • action: The cache action (pass, cache, restart, or deliver).
  • ttl: The maximum cache lifetime in seconds.
  • staleTtl: How long a stale object may be served in seconds.
For your developer

Arazzo workflow fastly:add-cache-settings, 3 operations: cloneServiceVersion → createCacheSettings → activateServiceVersion. Specs on APIs.io.