Refactors default cache dir, supresses file_put_contents errors