No need to lock if the cachedir does not exist.