opennextjs / opennextjs-cloudflare

Open Next.js adapter for Cloudflare
https://opennext.js.org/cloudflare
MIT License
378 stars 8 forks source link

[FEATURE] Support Cloudflare Cache API as alternative to KV #134

Open nathanclevenger opened 3 days ago

nathanclevenger commented 3 days ago

Is your feature request related to a problem?

Currently @opennextjs/cloudflare uses Workers KV as the cache for your Next.js app.

Some of our use cases have very high volumes of requests that we would like to cache, but it's not at all cost effective to Write/Read constantly to KV.

Describe the solution you'd like

For these use cases, we don't need global-distributed cache, as local colo-specific cache is fine, so we would simply prefer if we could configure the Next Cache to use the Cloudflare Workers Cache API.

Describe alternatives you've considered

As mentioned, it appears the only 2 alternatives today are to either disable caching or use KV for Next caching - We would just really appreciate an option to use the Cloudflare Cache API

@opennextjs/cloudflare version

0.2.1

Additional context

No response

Before submitting