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

Proposal: Add default cache-control #22

Open
transitive-bullshit opened this issue Jul 21, 2020 · 1 comment
Open

Proposal: Add default cache-control #22

transitive-bullshit opened this issue Jul 21, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@transitive-bullshit
Copy link
Contributor

cache.put(request, response) uses the response's cache-control header to determine the object's TTL (and other standard headers).

Currently, we're passing responses with no cache-control which isn't really well-specified by Cloudflare as to what this actually means.

Experimentally, it appears that CF caches these objects for ~10 seconds, but we should really override this with a default value.

Note that for Notion2Site, I'm passing pragma: no-cache to disable caching within the worker because Vercel's SWR edge caching is all that's needed. Any additional caching of the page data just introduces additional lag before updates are reflected to their edge cache.

@transitive-bullshit transitive-bullshit added the bug Something isn't working label Jul 21, 2020
@Syntyche3456
Copy link

Friend

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

No branches or pull requests

2 participants