1. memcached Introduction
Memcached is a high performance, distributed memory object caching system.
PHP operates the memcached service with two extensions memcache and memcached.
2. memcache extension
The memcache extension supports both object-oriented and process-oriented interfaces.
Its function is affected by php.ini, so it must be set in the php.ini configuration file.
The extension appears earlier (2004).
PHP.ini configuration:
[memcache]extension = Memcache.somemcache.allow_failover = "0" memcache.hash_strategy = "consistent" Memcache.default_ Timeout_ms = 100
3. memcached Extension
This extension uses the APIs provided by the Libmemcached library to interact with the memcached service side.
The libmemcached library must be installed first.
The memcached extension supports only object-oriented interfaces.
The installation does not need to be configured in php.ini, only the extension can be introduced.
The extension appears late (2009).
The memcached function is more complete than memcache and supports more functions.
3. which extension to use
It is recommended to use the memcached extension.
The memcached function is a bit more complete.
4. Specific comparison of different points
The following table compares the specific differences, address:
Https://code.google.com/p/memcached/wiki/PHPClientComparison