Download the PHP package bybzmt/lrucache without Composer
On this page you can find all versions of the php package bybzmt/lrucache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download bybzmt/lrucache
More information about bybzmt/lrucache
Files in bybzmt/lrucache
Download bybzmt/lrucache
More information about bybzmt/lrucache
Files in bybzmt/lrucache
Vendor bybzmt
Package lrucache
Short Description LRU cache server
License Apache-2.0
Homepage http://github.com/bybzmt/lrucache
Package lrucache
Short Description LRU cache server
License Apache-2.0
Homepage http://github.com/bybzmt/lrucache
Please rate this library. Is it a good library?
Informations about the package lrucache
LRUCache
这是一个使用LRU算法的cache服务 (LRU是指最后使用缓存)
cache中分不同的分组,每个分组有自己的容量和LRU维护
每次对指定key的数字进行写操作时,就会把这个key添加到 链表的开头。如果保存的key的个数达到上限,则会把链表尾的key给删除。
访问的方式为http请求 .
参数可以接受GET或POST方式
反回JSON {err:0, data:data}
错误类型:
0
成功1
错误, 非特定错误2
分组不存在3
key不存在4
key己存在
各请求url介绍
累加
/counter/incr
给指定key增加N,如果key不存在默认为0
参数:
group
分组名key
键名val
数值
取出数值最大的的N个key
/counter/hot
参数:
group
分组名len
取出的key的个数
设置指定的key
/cache/set
参数:
group
分组名key
键名val
数值
取得指定的key的值
/cache/get
参数:
group
分组名key
键名
删除指定的key
/cache/del
参数:
group
分组名key
键名
创建一个分组
/group/create
参数:
group
分组名cap
分组容量expire
过期时间saveTick
定时保存同期,0 不定时保存statusTick
定时统状态同期,0 不统计
删除一个分组
/group/del
参数
group
分组名
同时请求多个
/multiple/
这个地址再接上面的, 如 /multiple/cache/get
参数是
$data = array();
//参数与上面的一至
$data[] = array('group'=>'group1', 'key'=>'key1');
$data[] = array('group'=>'group2', 'key'=>'key2');
reqs = json_encode($data)
程序会返回一个与请求数量一样至的一个数组,里面是每个请求的反回
All versions of lrucache with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.3.0
The package bybzmt/lrucache contains the following files
Loading the files please wait ....