Skip to content

adapter-netlify edge function caching supportΒ #10707

Open
@HexaCubist

Description

@HexaCubist

Describe the problem

One feature of Netlify edge functions is the ability to cache responses, described here: https://docs.netlify.com/edge-functions/optional-configuration/#response-caching

This requires a small change to the manifest to indicate manual caching control:

Opt in to caching
You can set the cache property to manual inline in the function code, or in netlify.toml.

For inline configuration, use the config object in your edge function file.

import type { Config } from "https://edge.netlify.com"

export default async () => new Response("Hello, world!")

export const config: Config = {
  cache: "manual",
  path: "/hello"
}

Describe the proposed solution

From what I understand, if the adapter allowed some level of configurability of the manifest output it would be possible to enable caching here:

const edge_manifest = {

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions