lib/cache: fix locking around cache preallocation

Closes #582 (closed)

Edited by Lukas Jezek

Merge request reports

Loading