Install and test memcache on Windows

Source: Internet
Author: User

Copyright statement: original works can be reproduced. During reprinting, you must mark the original publication, author information, and this statement in hyperlink form. Otherwise, legal liability will be held. Http://blog.csdn.net/mayongzhan-ma yongzhan, myz, mayongzhan

Memcache is a danga.com project, the following is the specific project content http://www.danga.com/memcached/ --------------------------------------------------------- server install memcache Windows Server Download: http://jehiah.cz/projects/memcached-win32/ server decompress to a location and then cmd-> execute memecache.exe-D install memcache.exe-d start other commands see the following server to view the Windows service, check whether there is memcache ------------------------------------------------------- client install PHP memcache dll: http://pecl4win.php. Net/list. php put php_memcache.dll to ext in the PHP folder and add the extension part of extension = php_memcache.dll to PhP to check whether memcache exists. <? Phpphpinfo ();?> ------------------------------------------------------- Get familiar with memcache several times after testing comments ~, For other memcache methods, see <? Phpheader ("Content-Type: text/html; charset = UTF-8"); $ mem = new memcache (); $ mem-> connect ('2017. 127. 0.0.1 '); // $ mem-> set ('key', 'This is a test! ', 0, 60); $ val = $ mem-> get ('key'); // $ mem-> flush (); echo $ val;?> ----------------------------------------------------- Memecache server command-IP address of the port-l connection of the P listener. The default value is local-d start to start memcached service (in windows at the same time) -D restart memcached service-d stop | Shutdown shut down the running memcached service-D install memcached service-D uninstall memcached service-run as U (only run as root) valid) -MB maximum memory usage, in MB. By default, an error is returned when 64mb-m memory is used up, instead of deleting the maximum number of concurrent connections in item-C. The default value is 1024-f, and the default value is 1.25-n, the default value of key + value + flags is 48-H. It indicates that the memcache operation method memcache: Add-add an item to the servermemcache: addserver-Add a memcached server to connection poolmemcache :: close-close memcached server connectionmemcache: connect-open memcached server connectionmemcache_debug-turn debug output on/offmemcache: decrement-Decrement item's valuememcache: delete-delete item from the servermemcache:: flush-flush all existing items at the servermemcache: Get-retrieve item from the servermemcache: getextendedstats-get statistics from all servers in poolmemcache: getserverstatus-returns server statusmemcache :: getstats-get statistics of the servermemcache: getversion-return version of The servermemcache: Increment-increment item's valuememcache: pconnect-open memcached server persistent connectionmemcache :: replace-replace value of the existing itemmemcache: set-store data at the servermemcache: setcompressthreshold-enable automatic compression of large valuesmemcache: setserverparams-changes server parameters and status at runtime
Related Article

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.