-
Notifications
You must be signed in to change notification settings - Fork 338
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
Cache static data for a day #1708
Conversation
@@ -24,7 +24,7 @@ export async function createSsrHtml( | |||
|
|||
if (!appleTouchIcon) { | |||
appleTouchIcon = site?.site_view.site.icon | |||
? `data:image/png;base64,${sharp( | |||
? `data:image/png;base64,${await sharp( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
src/server/middleware.ts
Outdated
if (user.auth()) { | ||
caching = "private"; | ||
} else { | ||
caching = "public, max-age=60"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would changing max-age
here to 5
fix/mitigate our captcha and logout issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. I left a comment on your other PR about the Clear-Site-Data header. That would require a change to the js client instead of the UI, but it could help. The only rub is that the cache
option of site data is not supported in Firefox.
I say we change the |
This sets cache control for static content.