The 24-year-old du Preez joined the Pro12 club after leaving Southern Kings in 2013, while Cochrane, 32, arrived from London Wasps the following year.
Du Preez is enjoying working under compatriot and coach Alan Solomons.
"The squad karma is really good and the club is moving forward," said du Preez in a club statement.
"I enjoy working with Alan and it's good that he's staying on. I know what he expects from me."
Du Preez had previously worked under Solomons at his former club, but he suffered a serious lower leg injury last season.
"It was difficult coming back from injury, but our club physios did a great job to fix me up and all's good now," he said.
"I'm looking forward to helping the club stay in the top group of the Guinness Pro12 and challenging for a place in the Champions Cup next season."
Cochrane, who had spells with Rotherham Titans, Doncaster Knights and Bedford Blues, also praised Solomons' work and relished the challenge of winning a place in the team.
"We have some talented young hookers coming through the club, which is great and keeps me on my toes," said the Edinburgh-born forward, who made a mid-career switch from the back row.
Solomons was delighted to retain both players.
"Cornell is a class player who has proved invaluable for us," he said.  "He is also a great bloke and a good team man.
"Neil has made a terrific contribution to the team since returning home from Wasps.
"He is a superb hooker and a very good leader."

Almost 90 staff from Coventry's Whitley Depot were involved in the unofficial strike on Tuesday that affected tens of thousands of residents, the city council said.
The workers said they were protesting over the suspension of a colleague.
The council said the ongoing issue was still being resolved, but staff had returned to work for now.
More on this and other stores from Coventry and Warwickshire
Unite union says it is considering its position to hold a ballot for industrial action, pending the outcome of a decision on its members' suspended colleague.
Its union convenor was suspended by the council for organising an unofficial protest on Monday, union representatives said.
However, the council disputes the claim.
Councillor Rachel Lancaster said the worker in question had not been suspended for organising a protest. She said his suspension was being investigated, but the authority would not comment further.

The 2009 champions won once, against Bangladesh, and suffered defeats by India, New Zealand and Australia.
The team were jeered on their return to Lahore airport, with huge crowds chanting "Shame! Shame!"
Former fast bowler Waqar said: "If my leaving makes things better, then I would do it without delay."
Waqar is in charge as head coach for a second time and his current contract ends in May.
He added: "When there is no cricket at home [because of security concerns in Pakistan] then the foundation will for sure become weak. I place my hands together and beg forgiveness from the nation."
Captain Shahid Afridi, 36, is expected to announce soon whether he will be retiring from internationals or not.

The Shaymen held on until the 75th minute when the 28-year-old forward netted from Bradley Goldberg's cross.
Halifax were then denied an equaliser as Hamza Bencherif saw his shot, following a nice turn, hit the post.
The away side are a point above the drop zone, with Boreham Wood overtaking them after they drew with Barrow.
South African number eight Cornell du Preez and Scottish hooker Neil Cochrane have signed two-year contract extensions with Edinburgh.
[NEXT_CONCEPT]
Bin crews who went on strike leaving 30,000 homes with full rubbish bins have returned to work.
[NEXT_CONCEPT]
Pakistan head coach Waqar Younis has "begged forgiveness from the nation" after the side's group-stage exit from the World Twenty20.
[NEXT_CONCEPT]
Adam Cunnington's second-half strike was enough to earn Bromley victory as Halifax dropped closer to the relegation places.