Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers How the Cache works

Explains the mechanisms for interacting with the Cloudflare cache via the fetch API and the Cache API, including how to customize cache rules, store custom responses, and handle single-file purges.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers How the Cache works

Explains the mechanisms for interacting with the Cloudflare cache via the fetch API and the Cache API, including how to customize cache rules, store custom responses, and handle single-file purges.

When To Use

Use when you need to implement custom caching logic in a Worker, store non-origin responses using the Cache API, or configure specific cache rules via the fetch object.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-how-the-cache-works-workflow-guide.mdA guide explaining how Cloudflare Workers interact with the global cache, including methods for purging assets via single file or Cache API.Questions about a guide explaining how Cloudflare Workers interact with the global cache, including methods for purging assets via si...

What This Skill Covers

  • Workers was designed and built on top of Cloudflare's global network to allow developers to interact directly with the Cloudflare cache. The cache can provid...
  • Main sections: Interact with the Cloudflare Cache, Single file purge assets cached by a worker, Purge assets stored with the Cache API, Edge versus browser caching, fetch.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/reference/how-the-cache-works