Skip to content

SSR extracted cache huge file size #3218

Answered by kitten
Gitsack asked this question in Q&A
Discussion options

You must be logged in to vote

Or is the suggested solution to clear the cache on each request?

Please please please, do this 😅 If you don't have a mechanism to clear the cache, it'll continue growing indefinitely. The SSR Exchange is purely to replace client-side results with server-side results once.

The idea isn't to cache them indefinitely, share the cache between users, and to clear the cache, since often a CDN would be much better suited to caching SSR results. So, our recommendation is to re-create the client for each request

If you're sharing the client and results you're also running the risk of leaking authenticated data between requests

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Gitsack
Comment options

Answer selected by Gitsack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants