One, Installation of memcached
1. Download the memcache Windows stable version, extract and put under a certain disk, such as in c:\memcached
2. Enter ' c:\memcached\memcached.exe-d install ' installation at terminal (also known as cmd Command interface)
3. Re-enter: ' c:\memcached\memcached.exe-d start ' start. Note: Later memcached will start automatically every time a service is powered on as windows. This way the server side is already installed.
4. Download Http://pecl4win.php.net/ext.php/php_memcache.dll, please find the corresponding PHP version of the file
5. Join a line of ' Extension=php_memcache.dll ' in C:\winnt\php.ini
6. Restart Apache, and then look at the phpinfo, if there is memcache, then the installation is successful.
Second, in the application of PHP
1, Memcache WEB operation Process
2, know a Memcache method to use
3. What are the common methods of Memcache
Memcache:: Add -- adds a value, if it already exists, returns false
Memcache:: Addserver -- add a server address to use
Memcache:: Close -- Close a Memcache Object
Memcache:: Connect -- Create a Memcache Object
memcache_ Debug -- Control Debugging function
Memcache:: Decrement -- to one of the saved Key to subtract from the value in the
Memcache:: Delete -- Delete a Key value
Memcache:: Flush -- clear all cached data
Memcache:: Get -- get a Key value
Memcache:: Getextendedstats -- get run System statistics for all processes in the process pool
Memcache:: Getserverstatus -- get parameters for running the server
Memcache:: GetStats -- returns some running statistics for the server
Memcache:: getversion -- returns the running Memcache The version information
Memcache:: Increment -- to one of the saved Key to add the value in the
Memcache:: Pconnect -- Create a Memcache the persistent Connection object
Memcache:: Replace - R for an existing Key Overwrite Operation
Memcache:: Set -- Add a value, if it already exists, overwrite
Memcache:: Setcompressthreshold -- compress data that is larger than a certain size
Memcache:: setserverparams - Modify the server's parameters at run time