Our first hamster, the cats weren't really bothered by. If they went to have a sniff at him, he'd scamper up and it startled them a bit. Even when he got out of his hamster ball, the cats ran away from him!!
We then got two dwarf hamsters who ran off if the cats were anywhere near, and the only time I've seen my two cats work together was to push the cage off the sideboard and nab off with a hamster each. Both the hamsters were fine, and the cats never tried it again, but it was still quite a shock!
In short... it entirely depends on your cat, and your hamster. Just try and train your cat to leave the cage alone, like you would train them to do anything else.