Skip to content

[adapter-cloudflare-workers] Support writing rendered page to Cloudflare cache to achieve ISR #3862

@ivanvanderbyl

Description

@ivanvanderbyl

Describe the problem

The initial build on Cloudflare is quick, however, we'd like to cache it for a certain number of seconds on the Cloudflare cache or KV store to achieve something akin to Incremental Static Rendering in Next, where it will only re-render every N seconds.

This would also dramatically improve TTFB.

Describe the proposed solution

Add an option (or use information from load()) to indicate to the Cloudflare Worker to write the rendered result to Cloudflare cache with a TTL after rendering. Check if rendered result exists in cache before rendering.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

I'd be happy to implement it, if this aligns with the roadmap etc.

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