This article introduces you to the difference between Memcache and memcached and their installation steps! Hope to help beginners!
The difference between memcache and memcached
It's easy to understand that the memcached is a memory cache, but how about Memcache in a new program that intends to fully apply memcached technology?
It's actually very simple, memcache is PHP an extension for PHP management Memcached,php-memcache.dll.
If install memcached does not install the extension, then PHP cannot control the memcached, but the command is used to use no problem.
This cannot be used if the memcache extension is installed but the memcached service is not installed
You can use memcached in PHP to improve dynamic site performance only if you have both the memcached service and the memcache extension installed
Win7 system installation under 64-bit memcached steps:
Download Download Memcached-win32-1.4.4-14.zip, extract to disk, e.g. D:\memcached
Run cmd as Administrator and go to the folder where Memcached is located, for example: CD d:\memcached
Install memcached:
d:\memcached> memcached.exe-d Install
(after the screen without any hint)
Start memcached:
D:\memcached> memcached.exe-d Start
(There is no prompt after the screen, but in Task Manager, check "Show all user Processes", you can see that the Memcached.exe process is running)
memcached Basic parameter settings:
-P listening ports
" Span style= "font-size:15px;" >-D start memcached service
-D restart Restart memcached service
-D Stop|shutdown Close the running memcached service
-D install memcached service
" Span style= "font-size:15px;" >-d Uninstall uninstall memcached service
-m maximum memory usage, in megabytes. Default 64MB
-M memory exhausted when an error is returned instead of deleting the item
-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+flags default is-
You need to stop memcached before setting the parameters, and then use the command line settings, such as:d:\memcached> memcached.exe-m 1-d start
Stop memcached:
D:\memcached> memcached.exe-d Stop
Uninstall memcached:
d:\memcached> memcached.exe-d Uninstall
To install the PHP extension:
Memcache.dll:http://pecl.php.net/package/memcache
Download and place in the Php/ext extension file. Then modify the php.ini to add a sentence extension=php_memcache.dll