Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ideally you would save them as they were generated, and deliver the saved version the second time?


Yup, that's what happens. If you request a postcode that leads to an MP that's not been seen before, it starts generating that MP and saves the ongoing promise, and gives that promise to everyone else to asks for that MP.

Had to make sure to implement this so that I didn't end up generating duplicates.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: