Cardiff made it a quickfire double over their near neighbours as they rattled up five tries without reply in the first-half to continue their good end to the season.
Having beaten Caerphilly 38-8 at the Arms Park eight days earlier, they matched that tally in the opening 40 minutes to pile on the points and consolidate their fourth place in the Welsh Premiership.
It was Wales full back Rhys Williams who started the early flourish as he ran in a solo try after 18 minutes. By the interval Dean Dewdney, Adam Jones, Don van Vuuren and Ryan Powell had followed suit.
It was not the kind of start that former Cardiff and Wales great Mark
Ring had been hoping for from his home side, especially as they have a major European final to come in two weeks time when they face Castres in the Parker Pen Shield final in Reading.
Things went from bad to worse shortly after the break when Wales utility back Iestyn Harris hoisted his match tally to 20 points with a try and a sixth conversion to further stretch the lead.
But far from throw in the towel, Caerphilly rallied and two more penalties from outside half Luke Richards gave them new hope. Then two tries in the space of four minutes, both converted by Richards, breathed new life into the final quarter.
Wing Ryan Howells crossed for the first of the home tries and then lock Darren Davies romped over moments after his opposite number Heino Senekal was sent to the sin-bin. But all that was left in the game were two more penalties from the two outside halves and Cardiff hung on for victory.
Caerphilly: Tries: R Howells, D Davies; Cons: L Richards 2; Pens: L Richards 6.
Cardiff: Tries: R Williams, D Dewdney, A Jones, D
van Vuuren, R Powell, I Harris; Cons: I Harris 6; Pens: I Harris 2.
Wales reached their first semi-final since 2013 in the opening round of this season's HSBC World Rugby Sevens Series in Dubai. WRU TV's Graeme Gillespie recaps on what proved to be an eventful tournament
Wales and Ospreys back row James King, who came through the North Wales age grade system, nominated North Wales Regional Community Rugby Manager Marc Roberts, in the WRU's 'Diolch' initiative where squad players thanked those who played a part in their rise to the top.
Beating Merthyr has boosted Carmarthen Quins hopes of reaching a top eight spot in the Principality Premiership. Quins captain Haydn Pugh is delighted with his team's progress and is determined that everyone from the Under 6s through to the senior team, enjoys the ride.
When the Wales squad were asked to nominate individuals who played a big part in their early playing days, Wales and Dragons full back and wing Hallam Amos thought of his former Monmouth School rugby coach John Bevan.
Sam Cross and Luke Treharne have been named as co-captains of the Wales Sevens side as head coach Gareth Williams names his 12-man squad to play in the first leg of the HSBC World Series in Dubai next weekend.
Bedwas head coach Steve Law and players Nicky Griffiths and Alun Rees extol the virtues of the close knit club as they prepare to host third place RGC 1404 - who are one place head of them on the Principality Premiership points table - on Saturday.
Many of the Wales squad have said Diolch (thank you) to someone who played an important part in their early playing days by nominating them to be invited to the Wales v South Africa match. One person, Gowerton Comprehensive geography teacher Mr Dean Mason was nominated by two of his former pupils, Dan Biggar and Sam Davies.
The second WRU disability rugby pilot has been delivered, this time in Caerphilly schools, culminating in a festival at the Caerphilly Centre of Sporting Excellence, Ystrad Mynach tomorrow. Plans are in place to set up a Disability Rugby Club in Newbridge to provide long-term playing opportunities.
WRU TV: Hear from inside the Wales camp as Neil Jenkins discusses this weekend's clash with South Africa and how the squad are looking to put in a strong performance to round of the 2016 Under Armour Series