News for hackers. Stuff that matters.
Re:Show HN: Twitch Roulette – Find and chat with streamers w... by mumphster on Friday May 08, 2020 @08:46AM (#23114211)
Ya due to the way getting acess to this works, theres a 10 minute cache of active streams that get expired in redis and a cron job pulls in a fresh list
Re:Show HN: Twitch Roulette – Find and chat with streamers w... by the_duke on Friday May 08, 2020 @09:17AM (#23114504)
If you are not already, you could use the GraphQL API that the web app uses, which provides sorting by viewers ASC. That would allow for much more up to date results than iterating the full list with the official API.

Not sure how happy Twitch is about external users, but it can be accessed quite easily with some tinkering.

Re:Show HN: Twitch Roulette – Find and chat with streamers w... by mumphster on Friday May 08, 2020 @09:19AM (#23114526)
This is exactly what its doing, albeit caching results, somce im trying to be nice. Official api sadly does not allow sorting by asc.
Re:Show HN: Twitch Roulette – Find and chat with streamers w... by VectorLock on Friday May 08, 2020 @11:48AM (#23116101)
Hopefully they're cool about it. Typically companies like this frown upon ersatz API usage and cache/rehosting of their data.
Re:Show HN: Twitch Roulette – Find and chat with streamers w... by riteshpatel on Friday May 08, 2020 @09:53AM (#23114846)
Is there a reason for a 10 minute cache duration? Even 1 minute would be fine from a performance point of view
Re:Show HN: Twitch Roulette – Find and chat with streamers w... by mumphster on Friday May 08, 2020 @09:54AM (#23114859)
So I'm not hitting the api too much, this is going through a roundabout way to get this data