目录
译者序..................................................................................................................................................4
第1 章 memcached的基础.................................................................................................................5
1.1 memcached是什么?...............................................................................................................5
1.2 memcached的特征...................................................................................................................6
协议简单.....................................................................................................................................6
基于libevent的事件处理..........................................................................................................6
内置内存存储方式.....................................................................................................................6
memcached不互相通信的分布式.............................................................................................6
1.3 安装memcached.......................................................................................................................7
memcached的安装.....................................................................................................................7
memcached的启动.....................................................................................................................8
1.4 用客户端连接...........................................................................................................................8
1.5 使用Cache::Memcached..........................................................................................................9
使用Cache::Memcached连接memcached................................................................................9
保存数据...................................................................................................................................10
获取数据...................................................................................................................................10
删除数据...................................................................................................................................10
增一和减一操作.......................................................................................................................10
1.6 总结.........................................................................................................................................11
第2章 理解memcached的内存存储..............................................................................................12
2.1 Slab Allocation机制:整理内存以便重复使用...................................................................12
Slab Allocation的主要术语.....................................................................................................13
2.2 在Slab中缓存记录的原理....................................................................................................13
2.3 Slab Allocator的缺点.............................................................................................................13
2.4 使用Growth Factor进行调优................................................................................................14
2.5 查看memcached的内部状态................................................................................................15
2.6 查看slabs的使用状况...........................................................................................................16
2.7 总结.........................................................................................................................................17
第3 章 memcached的删除机制和发展方向...................................................................................18
3.1 memcached在数据删除方面有效利用资源.........................................................................18
数据不会真正从memcached中消失......................................................................................18
Lazy Expiration.........................................................................................................................18
3.2 LRU:从缓存中有效删除数据的原理.................................................................................18
3.3 memcached的最新发展方向.................................................................................................18
关于二进制协议.......................................................................................................................19
二进制协议的格式...................................................................................................................19
HEADER中引人注目的地方..................................................................................................20
|
|