You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(insights): remove data caching & pregeneration, add revalidate
These features aren't scaling well as the number of price feeds grows:
- The data cache doesn't seem to be reliably revalidating as expected, probably
due to it being an experimental nextjs feature. Given the [new model for
caching](https://nextjs.org/blog/composable-caching) that is coming in an
upcoming nextjs release, I think it best to just remove the experimental caching
until that lands.
- The pregeneration is starting to take way too long as the number of price
feeds grows drastically.
Instead, this PR adds `revalidate` to routes that use API data for
server-generation. This should avoid data cache issues while still serving
pages from cache and regenerating them every hour. The initial page load will
be slower since we aren't pregenerating any more, but subsequent page loads will
be served from cache.
If things still feel too slow, I'll investigate other solutions
0 commit comments