easyswoole/fast-cache
最新稳定版本:2.0.1
Composer 安装命令:
composer require easyswoole/fast-cache
包简介
An efficient swoole framework
README 文档
README
EasySwoole FastCache组件通过新开进程,使用SplArray存储,unix sock 高速通信方式,实现了多进程共享数据.
示例代码
use EasySwoole\FastCache\Cache; require 'vendor/autoload.php'; $http = new swoole_http_server("127.0.0.1", 9501); Cache::getInstance()->attachToServer($http); $http->on("request", function ($request, $response) { $res = Cache::getInstance()->set('easyswoole', 'easyswoole'); var_dump($res); $res = Cache::getInstance()->get('easyswoole'); $response->end($res); }); $http->start();
内存问题
数据分散在进程内,一个进程可能需要占用很大的内存,因此请根据实际业务量配置内存大小。
单元测试
服务启动
php example.php
执行测试用例
php vendor/bin/co-phpunit tests
统计信息
- 总下载量: 30.09k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2018-12-27