dawen/phpredis-bundle
Composer 安装命令:
composer require dawen/phpredis-bundle
包简介
A PhpRedis bundle for Symfony2
README 文档
README
Symfony 2 Bundle for phpredis extension
!!!WARNING
This bundle is under construction. It is highly recommended not using this bundle for production
WORKING METHODS
- hashes: hDel, hExists, hGet, hGetAll, hIncrBy, hIncrByFloat, hKeys, hLen, hMGet, hMSet, hSet
- keys: del, dump, exists, expire, expireAt, keys, move, object, persist, randomKey, rename, renameNx, type, sort, ttl, restore
- lists: brPop, blPop, brPoplPush, lGet, lGetRange, lInsert, lLen, lIndex, lPush, lPushx, lRange, lRem, lRemove, lSet, lSize, lTrim, ListTrim, rPop, rPopLPush, rPush, rPushx
- sets: sAdd, sCard, sContains, sDiff, sDiffStore, sGetMembers, sInter, sInterStore, sIsMember, sMembers, sMove, sPop, sRandMember, sRem, sRemove, sSize, sUnion, sUnionStore
- sorted sets: zAdd, zCard, zCount, zIncrBy, zInter, zRange, zRangeByScore, zRevRangeByScore, zRank, zRevRank, zSize
- strings: append, bitCount, decr, get, getBit, getRange, getSet, incr, incrByFloat, mget, mset, set, setBit, setex, setnx, setRange, strlen
- server: bgrewriteaof, bgsave, config, dbSize, flushAll, flushDB, info, lastSave, resetStat, save, slaveOf, time, slowlog
- connection: auth, close, echo (cEcho), getOption, ping, select, setOption
Missing Integration Tests
- keys: sort (waiting for sadd function)
- lists: blPop, brPop,
- server: resetStats, slaveOf
Methods Ignored
- connection: connect, pconnect, open, popen
- strings: delete, incrBy, decrBy, getMultiple, mSetNx, psetex
- keys: getKeys, setTimeout, pexpire, pexpireAt, renameKey, pttl
Methods not working
- strings: bitOp
- keys: migrate
Method Informations
- set: parameter timeout is defined as float in docbloc and function. It is an int or long. Float will rase an error
- bitOf: always returns 0
- migrate: returns false when successful
- lTrim: listTrim: return value is commented as array. Bool will be returned
- lPush: if optional parameter will be null, it inserts plank strings
- rPush: if optional parameter will be null, it inserts plank strings
- sDiff: Third param seems to be ignored
- sDiffStore: Third param seems to be ignored
- sInter: Third param seems to be ignored
- sInterStore: Third param seems to be ignored
- zInter: outKey is not stored, weight is not working
Configuration
here is a first sample configuration
be aware of the logging flag. When you run many redis commands and logging is enabled on production system, you could get a memory limit exceeded error. The logger redis client is collecting every command in a data collector.
config.yml
php_redis:
clients:
default:
host: localhost
port: ~
db: 0
pconnect: true
logging: true
connection_timeout: 1
importstatus:
host: localhost
port: ~
db: 1
pconnect: true
logging: true
Testing within Symfony2
for running the unit and integration tests add test parameters to your config: config_test.yml
parameters:
redis:
host: localhost
port: 6379
db: 10
db2: 9
Please keep in mind, that you have to run your own redis server.
Information The flushAll command will be performed in tests. It would be better to run an own instance for the tests
dawen/phpredis-bundle 适用场景与选型建议
dawen/phpredis-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 19.88k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2013 年 11 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「nosql」 「redis」 「symfony」 「phpredis」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dawen/phpredis-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dawen/phpredis-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dawen/phpredis-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The DreamFactory(tm) CouchDB Service.
Microservice RPC through message queues.
The bundle for easy using json-rpc api on your project
The CodeIgniter Redis package
贝嘟分布式缓存扩展
Symfony lock Tarantool store
统计信息
- 总下载量: 19.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-11-15