move cachedir creation to initcache