Skip to content
This repository was archived by the owner on Oct 25, 2026. It is now read-only.
pardnioPublic archive

About

(PHP Libaray) Redis client wrapper

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Last updated: 2026-10-25

Note

This README was generated by SKILL, get the ZH version from here.


REDIS DOWN? YOUR APP KEEPS RUNNING!

Packagist License


A PHP Redis client with persistent connections, per-call database selection, and failure-safe default returns

Table of Contents

Features

composer require pardnchiu/redis-cli · Documentation

  • Connection Failures Never Crash — Connect or auth failures only reach error_log, and every method returns a safe default such as false, an empty array, or 0 so callers can degrade.
  • Persistent Connections, Lazy Reconnect — pconnect reuses connections to cut handshake cost, and after a failed first connect every call tries to connect again.
  • Per-Call Database Selection — The first argument of every method is the DB index, so one instance works across multiple logical databases.
  • TTL on Write — Write methods for strings, hashes, lists, and sets accept an expiry in seconds, removing the extra EXPIRE call.
  • Common Data Types Covered — Strings, counters, hashes, lists, set algebra, and batch reads and writes share one consistent method signature.

Architecture

Full Architecture

graph TB
    A[Caller] --> B[pardnchiu\RDB]
    ENV[REDIS_HOST / PORT / PASSWORD] --> C[getConnection]
    B --> C
    C -->|OK| D[exec: select db + command]
    C -->|Fail| E[Safe default]
    D --> F[(Redis)]
Loading

License

This project is licensed under the MIT LICENSE.

Author

Just open an issue to share an idea.

php-redis-cli contributors

©️ 2024 邱敬幃 Pardn Chiu

About

(PHP Libaray) Redis client wrapper

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages