Avoid a dealock by sharing same lock as PerProjectCache manager.