1.2 客户端支持
php 要加 memcached 扩展. 目前 php 官网中提供了两种 memcache 扩展。
1.2.1 memcache
http://cn2.php.net/manual/en/book.memcache.php
1、Introduction
Memcache module provides handy procedural and object oriented interface to memcached, highly effective caching daemon, which was especially designed to decrease database load in dynamic web applications.
The Memcache module also provides a session handler (memcache).
More information about memcached can be found at » http://www.memcached.org/ .
说明:本处的 php-memcache 扩展是与服务器端同出一源。
2、安装
http://cn2.php.net/manual/en/memcache.installation.php
windows: http://downloads.php.net/pierre/
下载 PHP 对应版本的 php_memcache.dll, 放到 php/ext, 然后修改 php 的配置文件 php.int, 增加如下一行:extension=php_memcache.dll
Linux : http://pecl.php.net/get/memcache-2.1.2.tgz
将 php_memcache.dll 换成 memcache.so, 其它过程同 windows. 如果是编译安装,则加上enable-memcache[=DIR] 选项。
1.2.2 memcached
http://cn2.php.net/manual/en/book.memcached.php
1、Introduction
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.
This extension uses libmemcached library to provide API for communicating with memcached servers. It also provides a session handler (memcached).
Information about libmemcached can be found at http://libmemcached.org/libMemcached.html .
说明:此处扩展是使用 libmemcached 库提供 API。
2、install
如果是编译安装,则加上**--with-libmemcached-dir=DIR 选项;** 若需要压缩支持,则加上--with-zlib-dir=DIR; Session handler support is enabled by default. To disable it, use --disable-memcached-session switch.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论