Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vercel ISR support doesn't seem to work/is very flaky #9182

Closed
zusorio opened this issue Feb 23, 2023 · 2 comments · Fixed by #9197
Closed

Vercel ISR support doesn't seem to work/is very flaky #9182

zusorio opened this issue Feb 23, 2023 · 2 comments · Fixed by #9197
Labels
pkg:adapter-vercel Pertaining to the Vercel adapter

Comments

@zusorio
Copy link

zusorio commented Feb 23, 2023

Describe the bug

I followed the docs to set up vercel ISR in a test project, however that didn't seem to actually do anything.

Another project uses prerender = 'auto' but this seemed to make vercel cache the request indefinitely.

I then tried to make a reproduction with both no prerender and prerender = 'auto' in different routes, but with both routes present neither of them are cached.

I also have another more complex project that I originally wanted to use ISR for. In that project despite an identical setup ISR seems to work properly for the index route with prerender = 'auto'. However, it doesn't work for any API routes.

Reproduction

Not caching anything without prerender

https://sveltekit-isr-repro-682h0lk7v-zusor.vercel.app/
https://github.com/zusorio/sveltekit-isr-repro/tree/3d05c49c3f90e7c2a551e5b7b48de36a007e0cc5

Caching indefinitely with prerender = 'auto'

https://sveltekit-isr-repro-pmrfpyg4k-zusor.vercel.app/
https://github.com/zusorio/sveltekit-isr-repro/tree/38cc230ee687ea1be8b39eeaa0e6e7f149fb6f08

Caching nothing with and without prerender = 'auto'

https://sveltekit-isr-repro.vercel.app/
https://github.com/zusorio/sveltekit-isr-repro

Logs

No response

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 3.13 GB / 15.95 GB
  Binaries:
    Node: 16.19.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 110.0.5481.104
    Edge: Spartan (44.22621.1265.0), Chromium (110.0.1587.50)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    @sveltejs/adapter-vercel: ^2.1.0 => 2.1.0
    @sveltejs/kit: ^1.5.0 => 1.8.3
    svelte: ^3.54.0 => 3.55.1
    vite: ^4.0.0 => 4.1.4

Severity

annoyance

Additional Information

No response

@dummdidumm dummdidumm added the pkg:adapter-vercel Pertaining to the Vercel adapter label Feb 23, 2023
dummdidumm added a commit that referenced this issue Feb 23, 2023
Rich-Harris pushed a commit that referenced this issue Feb 23, 2023
* fix: move catch-all-regex to the end

part of #9182

* changelog
@tonprince
Copy link

@zusorio I am still unable to invalidate the cache manualy by calling the Sveltekit route with HEADER x-prerender-revalidate=TOKEN

How can I force the route to be regenerated?

@SchlammSpringer
Copy link

@zusorio I am still unable to invalidate the cache manualy by calling the Sveltekit route with HEADER x-prerender-revalidate=TOKEN

How can I force the route to be regenerated?

Same here. It is very flaky, if you always GET the page, a HTTP HEAD with the HEADER works, but if you POST, you can´t revalidate oder refresh the cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:adapter-vercel Pertaining to the Vercel adapter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants