Safely share cache between multiple instances.