lib/cache: ignore EINVAL from space pre-allocation

25 jobs for freebsd-fixes
in 11 minutes and 25 seconds and was queued for 11 seconds