ZF-8856: Zend_Cache_Backend_Memcached bad performance on adding setting keys
In the Zend_Cache_Backend_Memcached->save method it tries memcache->add and if it fails does a memcache->set. The comment just above this code says that set() seems slower.
My tests indicate that add() and set() is almost identical in speed.
Also, if done in this way we assume that the cache-keys doesn't already exist most of the time (that add() doesn't fail). If add() fails, the saving of a cache will take double time.
I propose to just call memcache->set(), and not do add() at all. This will give consistent speed on saving the cache.