It looks like the current code is not compatible with the php library memcached.
In the memcached protocol in the set command the flags parameter is not standardized. It would be convenient to be able to specify your own function to serialize / deserialize data so that you can adapt to any driver on any language.