llegaz/redis-adapter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

llegaz/redis-adapter

Composer 安装命令:

composer require llegaz/redis-adapter

包简介

additional layer based on phpredis/phpredis and predis/predis

README 文档

README

Intro

This project isn't really an adapter, for me, it is a sort of GATEWAY. (see Martin Fowler, Gateway Pattern).

The goal here is to adapt use of either Predis client or native PHP Redis client in a transparently way. Those are the real adaptees, their respective classes are extended to adapt them to the gateway (RedisAdapter) that will encapsulate one of them (as a redis client) and use one or the other indifferently depending on environment.

It will use preferably PHP Redis if available (extension installed), or else fallback on predis.

This class settles base for other projects based on it (PSR-6 and PSR-16 Cache systems and so on)

Redis Adapter project class diagram

Install

composer require llegaz/redis-adapter
composer install

env

In order to work we need php8 and some classical php extensions plus a local redis server (for testing purpose) and docker to test multiples instances of redis servers.

apt install php8.1 php8.1-cli php8.1-common php8.1-mbstring php8.1-opcache

and perhaps other packages may be required for composer to work smoothly

apt install php8.1-xml php8.1-http php8.1-dom

Dev

install redis servers with docker (you will need a valid docker and docker-compose on your system)

docker pull redis
docker-compose -f docker-compose.yml up -d

Contributing

You're welcome to propose things. I am open to criticism as long as it remains benevolent.

Stay tuned, by following me on github, for new features using predis and PHP Redis.

@see you space cowboy

llegaz/redis-adapter 适用场景与选型建议

llegaz/redis-adapter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 754 次下载、GitHub Stars 达 3, 最近一次更新时间为 2025 年 01 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 llegaz/redis-adapter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 llegaz/redis-adapter 我们能提供哪些服务?
定制开发 / 二次开发

基于 llegaz/redis-adapter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 754
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 8
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-16