Improve cache concurrency
Implements #1017