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

WBOY
풀어 주다: 2016-06-07 16:34:16
원래의
974명이 탐색했습니다.

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
  1. 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.
  2. 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「转」Memcache 和 Memcached 客户端的区别 PHP Client Comparison There are primarily two clients u […]「转」Memcache 和 Memcached 客户端的区别
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!