Caches: reduce code executed inside locked sections
Caches: add stress test