Polynomial Invariants for Cactuses