超快速的實現 session on memcache
看文件總是會有新發現...
如果你用的 php, php-memcache 版本夠新...
可以很輕易的將 Session 用 memcached 保存了...
http://tw.php.net/memcache
如果你用的 php, php-memcache 版本夠新...
可以很輕易的將 Session 用 memcached 保存了...
| session.save_path string Defines a comma separated of server urls to use for session storage, for example "tcp://host1:11211, tcp://host2:11211". Each url may contain parameters which are applied to that server, they are the same as for the Memcache::addServer() method. For example "tcp://host1:11211?persistent=1&weight=1&timeout=1&retry_interval=15" |
| 代碼: |
| <?php $session_save_path = "tcp://$host:$port?persistent=1&weight=2&timeout=2&retry_interval=10, ,tcp://$host:$port "; ini_set('session.save_handler', 'memcache'); ini_set('session.save_path', $session_save_path); ?> |
http://tw.php.net/memcache






迴響
目前沒有人留言.