1) memcached Several instructions:-P Listening Port-L connection IP address, default is the native-D start memcached service-D Restart Restart memcached service-D stop| Shutdown close the running memcached service-D install installation memcached service-d Uninstall uninstall memcached service-u Run as (only valid when running as root)-m maximum memory usage, in megabytes. Default 64MB-M memory is exhausted when the error is returned, instead of deleting the item-C maximum number of simultaneous connections, the default is the 1024-F block size growth factor, default is 1.25-n minimum allocation space, key+value+flags default is 48-h Display Help 2) memcached related functions : 01.memcache::add-adds a value and returns FALSE02 if it already exists. memcache::addserver-Add a server address 03 that is available for use. memcache::close-close a Memcache object 04.memcache::connect-create a Memcache object 05.memcache_debug-control the Debug function 06. Memcache::d ecrement-subtract from the value in one of the saved keys 07. Memcache::d elete-Delete a key value of 08. memcache::flush-clears all cached data 09. Memcache::get-gets a key value of 10. Memcache::getextendedstats-gets the running system statistics 11 for all processes in the process pool. Memcache::getserverstatus-gets the parameter 12 that runs the server. memcache::getstats-returns some run statistics for the server 13. memcache::getversion-returns the version information of the running Memcache 14.memcache::increment-add operation to the value in one of the saved keys 15. Memcache::p connect-Create a Memcache Persistent connection object 16.memcache::replace-r overwrite an existing key 17.memcache::set-add a value, overwrite 18 if it already exists . Memcache::setcompressthreshold-compresses data larger than a certain size by 19. Memcache::setserverparams-parameter Usage example of modifying server at run time <?php$memcache = new Memcache; $memcache->connect (' 127.0.0.1 ', 11211) Or Die ("Connection Failed"), $value =array ("123"), if (! $memcache->get (' a ')) {$memcache->set (' A ', $value, 120);} Print_r ($memcache->get (' a '));? >
Migration notes: PHP Cache technology memcached