Samuel
Ok putting revalidate: 3600 on the createSession call should fix it I think. Means that the session token will be always less than an hour old. However, seems a little wasteful since I only want to revalidate when the other one needs revalidating
Samuel@samuel.fm· 25 Sept 2023
Next 13 people - how can I group multiple fetch caches together. I need to fetch the session token before fetching posts - how do I make sure it doesn’t use a stale token without completely getting rid of the cache
2 4
Orual
Yeah I was wondering the same. Don't like wasting packets on failing to get a thing and then having to refresh the token, then get a thing again, and don't like that it's not clear how long the accessJwt token lasts in practice.
2 3
Samuel
@samuel.fm
It’s worse than that because getPosts is only run once at build time, and now there’s a serverless function spinning up every hour to get a new session token to do… nothing
2