News for hackers. Stuff that matters.
Re:Staying Out of TTL Hell by nerdponx on Wednesday March 10, 2021 @11:32AM (#26412995)
I once had this situation at an old job, and I ended up working around it by putting a lock around the re-computation: all requests had to wait for the 5-ish seconds while the cache was being refreshed.

In this case, per-request latency wasn't as important as total throughput of the system over time. And the individual requests were small, so building up a queue of unhandled requests wasn't a problem.

I have no idea if this is considered a "good" solution, but it worked well enough for me at the time.

There are no comments on this comment yet.