Content
@
https://opensea.io/collection/dev-21
0 reply
0 recast
2 reactions
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
0 recast
34 reactions
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
@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