- Perl
- PHP
- Python
- Ruby
- C#
- C/C++
- Lua
- JAVA
下面笔者说下JAVA的客户端
MemcachedClient
spymemcached
xmemcached
其中xmemcached比较不错,支持连接池的高性能客户端。
xmemcached接口
key - stored key
exp - An expiration time, in seconds. Can be up to 30 days. After 30 days, is treated as a unix timestamp of an exact date.
value - stored data
transcoder - transocder
timeout - operation timeout,in milliseconds 操作超时
保存数据
选项 | 说明 |
add | 仅当存储空间中不存在键相同的数据时才保存 |
replace | 仅当存储空间中存在键相同的数据时才保存 |
set | 与add和replace不同,无论何时都保存 |