Cole grabbed the opener for the Hammers as they claimed their first league victory since November, to climb above the Bluebirds and out of the relegation zone.
West Ham went into the game in the Welsh capital on the back of successive heavy defeats to Nottingham Forest and Manchester City, with the performances prompting the fans to start calling for boss Sam Allardyce's head.
However, the crucial win seems to have bought the underfire manager some time and former England striker Cole admits the three points have given the squad a huge lift.
"Obviously that was a win that we needed to get and both before and after my goal we defended well, bedded in and it gave us the platform to go on and win the game," he told the club's official website. "It was important that we kept a clean sheet because it meant that we would get something from the game, especially away from home.
"We needed to get at least a point, so the three points were exactly what was required. That was a real boost for us."
Next on the agenda for the East Londoners is Newcastle United at home on Saturday and punters may choose to use their free bet to back Allardyce's men to make it two wins in a row against the Magpies.