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

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

Michael Pfister pfp
Michael Pfister
@pfista
How would I do that for the call thatโ€™s in my lambda? Itโ€™s a contract call through viem to an alchemy node, afaik viem doesnโ€™t let you control the underlying fetch settings
1 reply
0 recast
0 reaction