Fixed cache init related type errors.