Migration Note: PHP Cache technology memcached

Source: Internet
Author: User

 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.