Skip to content
Playground(another site)

bynk.cloudflare.edge_cache_duplicate

Error A context declares a second EdgeCache instance; the edge cache is one setting for the whole Worker.

Workers Cache is one setting for the whole Worker, and a context has one Worker, so a context declares at most one EdgeCache instance, which both turns the cache on and purges it. A second would be another handle on the same cache, so it is refused. Delete it and use the first instance wherever you need it, with given.

Example

capability Edge = EdgeCache
capability Cdn = EdgeCache // ✗ one `EdgeCache` per context
capability Edge = EdgeCache // ✓ use `Edge` everywhere

In the Book

See also

  • Every code in its category, Cloudflare, on the diagnostic index.
  • bynk explain bynk.cloudflare.edge_cache_duplicate shows the same from the installed toolchain, without a network.