PHP memcache installation, under WINDOW10

Source: Internet
Author: User

1.memcached-win corresponds to the installation package2.unzip, can be placed in any directory, as an administrator to open cmd3.Under the installed directory, execute the following command memcachedExed Install installation Memcached.exe–d start open service memcahced.exe–d Stop stop service Memcached.exe–d Restart Restart memcachedExed Uninstall Uninstall4.Connect D after startup:wampbin> telnet 11211– Connect memcache port 11211 using quit quit. 5.5 common Commands –stats:status information for all currently running memcached servers –add:add a data to the server –set:Replace a data that already exists and the same as the add command if the data does not exist. –get:extracts the specified data from the server side. –delete:Delete the specified individual data, and if you want to clear all data, you can use the Flush_all directive. 6.The error portion of the memcache protocol is mainly three hint instructions: –error-common error messages, such as command errors –client_error< error messages >-Client Error –server_error< error messages >– Server-side error7.Data Management Command format:< commands > < keys > < tags > < validity > < data length >Where: – Command: Add (add), set (modify), delete (delete), Get (Get) –< keys >-Key, is the key content sent over the instruction -< tags >–flags, which is the flags tag when a set instruction is called to save data-the expiration date: is the validity period of the data on the server, and if it is 0, the data is always valid, in seconds – the length of the data, the length of the block data blocks, Generally after the end of this length of the next line followed by block data data content, – after sending the data, the client generally waits for the server side of the return, the server side of the return: –stored data saved successfully –not_stored data save failed, Because the server side of this data key already exists8.Configuration of PHP ext/folder below, put the corresponding php_memcache.dll file PHP. ini configuration file, add the following: Extension=php_memcache.DLL Restart service Apache9.the method of Memcache class in PHP memcache::Add ———— Add an entry to the cache server Memcache::addserver ———— Add a memcache server to the connection pool memcache::Close ———— Turn off memcache connection Memcache::Connect ———— Open a memcached service-side connection Memcache::Decrement ———— Decrease the value of the element memcache::Delete ———— Remove an element from the server memcache::Flush———— Cleaning (deleting) All the elements that have been stored memcache::get ———— Check back an element from the server memcache::getextendedstats All server statistics in the ———— cache server pool Memcache:: Getserverstatus ———— get a server online/Offline status Memcache::getstats ———— Get server statistics memcache::getversion ———— Return server version information Memcache::increment ———— Increase the value of one element memcache::pconnect ———— Open a persistent connection to the server Memcache::Replace ———— replaces the value of an already existing element memcache::set ———— Store data at the Servermemcache::setcompressthreshold ————— Turn on large-value auto-compression memcache::Setserverparams ———— The runtime modifies the server parameters and the state memcache function Memcache_debug ———— convert the debug output to the open/off10.memcached basic parameter settings:-p port to monitorThe IP address of the-l connection,The default is native-d start memcached service-d Restart re-start memcached service-D stop|shutdown shutting down a running memcached service-d install 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 An error is returned instead of deleting an item when running out of memory-c The maximum number of simultaneous connections, the default is 1024x768-F Block size growth factor, default is 1.25-n minimum allocation space,Key+value+the flags are by default-h Display Help setting parameters need to stop memcached and then set with the command line, for example: C:\memcached> memcached.exe-m 1-d Start

PHP memcache installation, under WINDOW10

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: 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.