Content pfp
Content
@
0 reply
0 recast
2 reactions

Michael Pfister pfp
Michael Pfister
@pfista
got caught off guard by vercels data cache... we call the hypersub smart contract to get a users remaining time via serverless function the calls are made with viem/alchemy, which uses fetch under the hood I guess vercel started caching fetch requests recently? this led to subscriptions not being recognized in our app ๐Ÿ˜ž
8 replies
2 recasts
39 reactions

Michael Pfister pfp
Michael Pfister
@pfista
If you run into this issue, you can add this route segment config to disable fetch caching within your route https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#fetchcache
0 reply
0 recast
4 reactions

alex pfp
alex
@alexgrover.eth
This has been the case since next 13 was released, but they recently announced theyโ€™re rolling back the automated caching behavior because everyone hates it lol
1 reply
1 recast
18 reactions

matt ๐Ÿ’ญ pfp
matt ๐Ÿ’ญ
@matthewmorek
they've been caching GET requests by default all along. one of many Next.js blackbox shenanigans you gotta be prepared for
1 reply
0 recast
4 reactions

MOฮž pfp
MOฮž
@moe
i believe viem has a way to set cache headers for http requests. but not sure if vercel would respect that.
1 reply
0 recast
1 reaction

REV SHARE pfp
REV SHARE
@ruslan
Vercel moment lol Literally one of the most bloodsucking companies in the modern industry trying to get everyone hooked on SSR, which sucks up a ton of cash and is useless in 9 out of 10 cases, while not offering anything that cheap VPS with open-source control panels can't offer
2 replies
0 recast
3 reactions

iain pfp
iain
@iain
You should return a cache-control header from your lambda to prevent this or do a post or add a ?tm= cache bust parameter of unixtime.
1 reply
0 recast
2 reactions

Steve pfp
Steve
@stevedylandev.eth
@polluterofminds and I know this too well with some projects we were working on; drove us absolutely mad until we eventually figured it out ๐Ÿซ 
1 reply
0 recast
2 reactions

Joe Blau ๐ŸŽฉ pfp
Joe Blau ๐ŸŽฉ
@joeblau
LOL, been rekt by the same thing 3 months ago. You have to explicitly set the request's to not cache.
0 reply
0 recast
1 reaction