It aims to be compatible with the PHP Memcached class. You can find documentation on the PHP Memcached class here. Not all features are supported at this time.
include('MemcacheSASL.php'); /* connect to a server */ $m = new MemcacheSASL; $m->addServer('127.0.0.1', '11211'); /* set timeout to 2 second */ $m->setOption(MemcacheSASL::OPT_SEND_TIMEOUT, 2000000); $m->setOption(MemcacheSASL::OPT_RECV_TIMEOUT, 2000000); /* set SASL username and password */ $m->setSaslAuthData('username', 'password'); /* perform some operations */ var_dump($m->add('test', '123')); $m->delete('test');
Changes vs. ronnywang Version
This is a fork of the original code base by Ronny Wang. We have made the following improvements:
- Support for
- Support for timeouts on operations (connections and requests).
- Support for the PHP Composer package manager.
This library is BSD-licensed.
We are happy to receive bug reports, fixes, documentation enhancements, and other improvements.
Please report bugs via the github issue tracker.
Master git repository:
git clone git://github.com/memcachier/PHPMemcacheSASL.git
This library was written by Ronny Wang and MemCachier.
Ronny Wang wrote the initial version and bulk of the code, MemCachier later forked it to improve on the code base.