1
0
Fork 0
forked from OpenNeo/impress
impress/src
Matchu 002af474f8 Don't HTTP cache currentUserOwnsThis/wants
Hmm, I see, Vercel chews on Cache-Control headers a bit more than I'm used to, so anything marked `scope: PRIVATE` would not be cached at all.

But on a more standard server, this was coming out as privately cacheable, but for an actual amount of time (1 hour in the homepage case), because of the `maxAge` on other fields. That meant the device browser cache would hold onto the result, and not always reflect Own/Want changes upon page reload.

In this change, we set `maxAge: 0`, because we want this field to be very responsive. I also left `scope: PRIVATE`, even though I think it doesn't really matter if we're saying the field isn't cacheable anyway, because I want to set the precendent that `currentUser` fields need it, to avoid a potential gotcha if someone creates a cacheable `currentUser` field in the future. (That's important to be careful with though, because is it even okay for logouts to not clear it? TODO: Can we clear the private HTTP cache somehow? I guess we would need to include the current user ID in the URL?)
2021-11-16 12:04:16 -08:00
..
app Merge branch 'main' into ansible 2021-11-16 11:23:01 -08:00
server Don't HTTP cache currentUserOwnsThis/wants 2021-11-16 12:04:16 -08:00
shared Fix UC outfit images 2021-05-25 17:02:29 -07:00
index.js [WIP] Fix eslint for Next.js 2021-11-01 22:07:46 -07:00
react-app-env.d.ts Finally finish TS setup, build works! 2021-02-02 21:38:57 -08:00