This serialises both reads and writes to the same key. I guess this should be fine if there's not enough contention, in future me might consider a working thread with a queue handling these requests.
What's the burden added to the system by this computation BTW?