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

[Bug?]: Cloudflare presets don't cache assets #1315

Closed
2 tasks done
rvlzzr opened this issue Feb 7, 2024 · 2 comments
Closed
2 tasks done

[Bug?]: Cloudflare presets don't cache assets #1315

rvlzzr opened this issue Feb 7, 2024 · 2 comments
Labels
bug Something isn't working vinxi related to vinxi

Comments

@rvlzzr
Copy link
Contributor

rvlzzr commented Feb 7, 2024

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

In solid-start 0.3 using the cloudflare adapters, refreshing the page and looking at the network section of devtools, you see assets all showing (memory cache) as expected.

In the current version, everything hits the server which returns 304 status.

Expected behavior 🤔

Assets should be cached.

Steps to reproduce 🕹

Steps:

  1. Use one of the cloudflare presets and build/deploy.
  2. Open network tab of devtools in your browser.
  3. Refresh the page.
  4. Note that you never see memory or disk cache for assets.

Context 🔦

No response

Your environment 🌎

No response

@rvlzzr rvlzzr added the bug Something isn't working label Feb 7, 2024
@rvlzzr
Copy link
Contributor Author

rvlzzr commented Feb 7, 2024

Also routeRules as per nksaraf/vinxi#140 (comment) don't seem to do anything for Cloudflare as far as I can tell -- I don't see any working way to send cache-control headers for assets that works with the cloudflare adapters (and shouldn't this be the default anyway?).

@ryansolid ryansolid added the vinxi related to vinxi label Feb 8, 2024
@ryansolid
Copy link
Member

Hmm.. we might have done something special for our previous adapters but now we follow nitro's preset. So the advice from nksaraf/vinxi#140 (comment) is the solution. If that doesn't work it is on Nitro/Vinxi side but there isn't anything we can do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vinxi related to vinxi
Projects
None yet
Development

No branches or pull requests

2 participants