Skip to content

Preset vercel: query params are ignored by cache #1880

Description

@fmoessle

Environment

nitro: 2.7.0
node: v18.18.0
nuxt: 3.8.0

Reproduction

not available

Describe the bug

I use query params to figure out what page in a pagination the server should render, e.g. /?page=1

When configuring cache like this

routeRules: {
  '/**': {
    cache: {
      swr: true,
      maxAge: 60 * 60 * 48,
      staleMaxAge: 60 * 60 * 96
    }
  }
}

vercel's cache seems to ignore the query param "page". When loading "/?page=2" I receive the cached version for "/".

This doesn't seem the be an issue with Vercel, because other pages (not nuxt/nitro) don't suffer from this issue.

So my assumption is this is an issue with nitro's vercel preset.

Additional context

No response

Logs

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