mysql和memcache区别_「转」Memcache 和 Memcached 客户端的区别

PHP Client Comparison There are primarily two clients used with PHP. One is the older, more widespread?pecl/memcache?and the other is the newer, less used, more feature rich?pecl/memcached. Both support the basics such as multiple servers,

PHP Client Comparison

There are primarily two clients used with PHP. One is the older, more widespread?pecl/memcache?and the other is the newer, less used, more feature rich?pecl/memcached.

Both support the basics such as multiple servers, setting vaules, getting values, increment, decrement and getting stats.

Here are some more advanced features and information.

pecl/memcache

pecl/memcached

First Release Date

2004-06-08

2009-01-29 (beta)

Actively Developed?

Yes

Yes

External Dependency

None

libmemcached

Features

Automatic Key Fixup1

Yes

No

Append/Prepend

No

Yes

Automatic Serialzation2

Yes

Yes

Binary Protocol

No

Optional

CAS

No

Yes

Compression

Yes

Yes

Communication Timeout

Connect Only

Various Options

Consistent Hashing

Yes

Yes

Delayed Get

No

Yes

Multi-Get

Yes

Yes

Session Support

Yes

Yes

Set/Get to a specific server

No

Yes

Stores Numerics

Converted to Strings

Yes

pecl/memcache will convert an invalid key into a valid key for you. pecl/memcached will return false when trying to set/get a key that is not valid.

You do not have to serialize your objects or arrays before sending them to the set commands. Both clients will do this for you.

—end–

原文链接:https://code.google.com/p/memcached/wiki/PHPClientComparison

PS:Memcache会将数字转成字符串存储这个坑刚踩到过~

评论| 作者: tomheng 85159e08d5f1f50d244825cb03e92c65

1782.html

PHP Client Comparison There are primarily two clients u […]

1782.html

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值