When using Windows the comparison is cut short: memcache appears to be the only client available. brew install memcache and man memcache are not available on mac.
The piece that does the backend work is called a “daemon” (think “service” in Windows-land), while the interface or client application is what you use to control or access the daemon. The daemon is most often named the same as the client, with the letter “d” appended to it. For example “imap” would be a client that connects to the “imapd” daemon.
Memcached is a caching daemon designed especially for dynamic web applications to decrease database load by storing objects in memory.
Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.
PECL :: The PHP Extension Community Library
PECL is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions. To connect the memcached to PHP, there is an extension named memcache and one named memcached in PHP which are different extensions to access memcache or we can say PHP has two memcached libraries named memcache and memcached.
memcache (http://pecl.php.net/package/memcache) memcached extension which allows to work with memcached through handy OO and procedural interfaces. Memcache has been around longer, does not require additional libraries, and has pre-compiled binaries (http://downloads.php.net/pierre/) for even windows.
memcached (http://pecl.php.net/package/memcached) PHP extension for interfacing with memcached via libmemcached library. This extension uses libmemcached library to provide API for communicating with memcached servers. Memcached offers more methods but it also require external C/C++ libraries libmemcached ( http://tangent.org/552/libmemcached.html) to provide API for communicating with
memcached servers and also require to install libevent (http://www.monkey.org/~provos/libevent/) for it to compile. Memcached is a newer API, it also provide memcached as a session provider which could be great if you have a farm of server. memcached is a high-performance, distributed memory object caching system,
generic in nature, but intended for use in speeding up dynamic web applications
by alleviating database load.
The frustration here is caused by the author of the PHP extension which was badly named memcached, since it shares the same name as the actual daemon called memcached.
- Install memcached through
- brew install memcached
and after installation check with
- man memcached
- memcached -h
- brew install libmemcached
- brew install libevent
- Run on console sudo /Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcached
- Run /Applications/MAMP/bin/php/[php version folder]/bin/pecl channel-update pecl.php.net
Make sure pecl compiled the memcache extension to the correct place. It should be in a folder named: /Applications/MAMP/bin/php/[PHP VERSION FOLDER]/lib/php/extensions/no-debug-non-zts-20060613