In my experience, those knockoff magsafe cables are completely useless. I had a Macbook power supply where the connector stopped working. I saw a bunch of cables on Amazon for $5 or so, much cheaper than getting a new power supply obviously.
I must have went through at least 5 of those knockoff replacement cables. Several different brands (though who knows if the different brands listed on Amazon all get their product from the same supplier.) None lasted more than a couple weeks.
I eventually broke down and bought another Apple charger. That one stopped working about 10 months later. At least it was in the warranty period.