3 ms·
Do you really want to deal with caching logic for what should be a simple API call? Sounds like a convincing argument to use whatever this product is.
by RockRobotRock 3y ago
Do you really want to deal with caching logic for what should be a simple API call? Sounds like a convincing argument to use whatever this product is.
- internetter 3y agoclient = (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.
- hot_gril 3y agoAssuming you have Redis
- internetter 3y agoRedis uses like 5mb of baseline RAM and can be deployed in a few lines of docker-compose.
- deleted 3y ago[deleted]
- hot_gril 3y agoI'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.
- internetter 3y agoOk? 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?
- hot_gril 3y agoI 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.
- randomdata 3y agoHell, just stick the data in memory.
- hot_gril 3y agoValid strategy
- kellpossible2 3y agoIt's max a couple of hours work to cache in some local database like sqlite or in memory.