All Projects → vus520 → think-redisd

vus520 / think-redisd

Licence: other
thinkphp 5 redis读写分离驱动

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to think-redisd

say-love-wall
💖 由ThinkPHP5框架开发即开箱可用的告白墙、校园表白墙。表白可以通过发送邮箱告知对方,也可以分享表白内容。更多趣味查看 README.md 或网站。
Stars: ✭ 32 (+33.33%)
Mutual labels:  thinkphp, thinkphp5
jwt-auth
JSON Web Token Authentication for Thinkphp
Stars: ✭ 113 (+370.83%)
Mutual labels:  thinkphp, thinkphp5
lake-admin
lake-admin是一款基于ThinkPHP6和Layui的后台开发框架。
Stars: ✭ 28 (+16.67%)
Mutual labels:  thinkphp, thinkphp5
Thinkadmin
基于 ThinkPHP 基础开发平台(登录账号密码都是 admin )
Stars: ✭ 1,938 (+7975%)
Mutual labels:  thinkphp, thinkphp5
Wemall
wemall7 开源版本 (不含商城)
Stars: ✭ 315 (+1212.5%)
Mutual labels:  thinkphp, thinkphp5
Nonecms
基于thinkphp5.1 的内容管理系统,可快速搭建博客、企业站;并且增加了实时聊天室
Stars: ✭ 261 (+987.5%)
Mutual labels:  thinkphp, thinkphp5
think-permission
ThinkPHP 6 权限认证
Stars: ✭ 32 (+33.33%)
Mutual labels:  thinkphp, thinkphp5
Uniadmin
UniAdmin是一套渐进式模块化开源后台,采用前后端分离技术,数据交互采用json格式,功能低耦合高内聚;核心模块支持系统设置、权限管理、用户管理、菜单管理、API管理等功能,后期上线模块商城将打造类似composer、npm的开放式插件市场;同时我们将打造一套兼容性的API标准,从ThinkPHP5.1+Vue2开始,逐步吸引爱好者共同加入,以覆盖larval、spring-boot、django、yii、koa、react等多语言框架。
Stars: ✭ 277 (+1054.17%)
Mutual labels:  thinkphp, thinkphp5
Lyadmin
lyadmin是一套轻量级通用后台,采用ThinkPHP+Bootstrap3制作,内置系统设置、上传管理、权限管理、模块管理、插件管理等功能,独有的Builder页面自动生成技术节省50%开发成本,先进的模块化开发的支持让开发成本一降再降,致力于为个人和中小型企业打造全方位的PHP企业级开发解决方案。另外提供整套企业开发解决方案,集PC、手机、微信、App、小程序五端于一体,更有用户中心模块、门户模块、钱包支付中心模块、商城模块、OAuth2统一登陆、内部Git模块、Docker模块可供选择。
Stars: ✭ 1,066 (+4341.67%)
Mutual labels:  thinkphp, thinkphp5
tp5-rbac
一个tp5的RBAC库,使用composer来安装和更新你的项目对于RBAC的需求。同时支持jwt方式的验证。包含了RBAC需要的数据表的数据迁移,能够很方便的开始开发。
Stars: ✭ 69 (+187.5%)
Mutual labels:  thinkphp5, tp5
Redis Operator
Redis Operator creates/configures/manages Redis clusters atop Kubernetes
Stars: ✭ 142 (+491.67%)
Mutual labels:  redis-cluster
Redis
Type-safe Redis client for Golang
Stars: ✭ 13,117 (+54554.17%)
Mutual labels:  redis-cluster
Blog
MyBlog
Stars: ✭ 197 (+720.83%)
Mutual labels:  redis-cluster
Redis exporter
Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x, 4.x, 5.x and 6.x
Stars: ✭ 2,092 (+8616.67%)
Mutual labels:  redis-cluster
Anotherredisdesktopmanager
🚀🚀🚀A faster, better and more stable redis desktop manager [GUI client], compatible with Linux, Windows, Mac. What's more, it won't crash when loading massive keys.
Stars: ✭ 17,704 (+73666.67%)
Mutual labels:  redis-cluster
E3 Springboot
SpringBoot+Docker重构宜立方商城
Stars: ✭ 139 (+479.17%)
Mutual labels:  redis-cluster
Overlord
Overlord是哔哩哔哩基于Go语言编写的memcache和redis&cluster的代理及集群管理功能,致力于提供自动化高可用的缓存服务解决方案。
Stars: ✭ 1,884 (+7750%)
Mutual labels:  redis-cluster
Csredis
.NET Core or .NET Framework 4.0+ client for Redis and Redis Sentinel (2.8) and Cluster. Includes both synchronous and asynchronous clients.
Stars: ✭ 1,714 (+7041.67%)
Mutual labels:  redis-cluster
docker-redis-haproxy-cluster
A Redis Replication Cluster accessible through HAProxy running across a Docker Composed-Swarm with Supervisor and Sentinel
Stars: ✭ 44 (+83.33%)
Mutual labels:  redis-cluster
Redis Cluster
Redis Cluster setup running on Kubernetes
Stars: ✭ 230 (+858.33%)
Mutual labels:  redis-cluster

ThinkPHP 5.0 Redisd驱动,简单的读写分离实现

step 1, 安装 php-redis 驱动

https://github.com/phpredis/phpredis

Centos上的安装命令

git clone https://github.com/phpredis/phpredis
cd phpredis
phpize
./configure [--enable-redis-igbinary]
make && make install

echo extension=redis.so>/etc/php.d/redis.ini

php -m | grep redis

step 2, 修改thinkphp配置文件,加载 redisd 驱动

vim application/config.php
配置参数:
'cache' => [
    'type'       => '\think\Redisd'
    'host'       => 'A:6379,B:6379', //redis服务器ip,多台用逗号隔开;读写分离开启时,默认写A,当A主挂时,再尝试写B
    'slave'      => 'B:6379,C:6379', //redis服务器ip,多台用逗号隔开;读写分离开启时,所有IP随机读,其中一台挂时,尝试读其它节点,可以配置权重
    'port'       => 6379,    //默认的端口号
    'password'   => '',      //AUTH认证密码,当redis服务直接暴露在外网时推荐
    'timeout'    => 10,      //连接超时时间
    'expire'     => false,   //默认过期时间,默认为永不过期
    'prefix'     => '',      //缓存前缀,不宜过长
    'persistent' => false,   //是否长连接 false=短连接,推荐长连接
],

step 3, 使用redisd驱动

$redis = \think\Cache::connect(Config::get('cache'));
$redis->master(true)->setnx('key');
$redis->master(false)->get('key');
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].