Is a cavernous haemangioma hereditary?

Usually. Cavernous hemangiomas usually occur sporadically.
Rarely. Cavernous hemangiomas are almost never hereditary except some very uncommon syndromes.