examples/http-cache/index.js
async function origin(req, init) {
  const url = new URL(req.url)

  switch (url.pathname) {
    case "/":
      return new Response(`hello at ${new Date()}`, {
        headers: {
          "Cache-Control": "max-age=600"
        }
      })
    case "/never-cache":
      return new Response(`hello at ${new Date()}`)
  }
  return new Response("not found", { status: 404 })
}
async function origin(req, init) {
  const url = new URL(req.url)

  switch (url.pathname) {
    case "/":
      return new Response(`hello at ${new Date()}`, {
        headers: {
          "Cache-Control": "max-age=600"
        }
      })
    case "/never-cache":
      return new Response(`hello at ${new Date()}`)
  }
  return new Response("not found", { status: 404 })
}
This is just a basic origin http server that
response to two paths:

`/` => "hello", cached for 10 min
`/never-cache` => "hello", never cached