Most caching libraries don't do locking, meaning that >1 process can be calculating a cached value at the same time. Since you presumably cache things because they cost CPU, database reads, or money, doesn't it make sense to lock while caching?
Use Postgres advisory lock to isolate code execution across machines
Around the webAdd
No links yet, just add one :-D