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

client = (APIcall) => redis.get(sha1(APIcall)) || { res = api(APIcall); redis.set(sha1(APIcall),res) return res }

Not that hard. Like 10 lines of code to get a decentish cache going.



Assuming you have Redis


Redis uses like 5mb of baseline RAM and can be deployed in a few lines of docker-compose.


I'm not allowed to do that where I work. License is a no-no, can't run jobs without red tape, and there's no Docker either.


Ok? I'm surprised your work lets you build a whole product ontop of google sheets, then. Also, why did you delete your original comment on not having a server?


I deleted it cause I realized this thing has a server (probably). Was mixing it up with other people's projects that didn't have one.

They're internal tools, but big ones. And I'm surprised too. You won't hit too much resistance doing things the well-supported ways, but for some reason there's no well-supported way to run a cache.


Hell, just stick the data in memory.


Valid strategy




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: