Added support for dashes in machine name, prevent cache clear error if cache not set.