Family Euphorbiaceae
Although different, these are call classified as
Euphorbia and not Cactaceae for some reason.A general test, is whether the plant has milky latex (Euphorbia). This would tell you that it is not a cactus (Cactaceae have clear sap).
Most of this type of cactus is small, growing only to about 30cm at most.
They are found in the more arid regions of South Africa.