Search by

pardnchiu / redis-cli

pardnchiu

This package is abandoned and no longer maintained. No replacement package was suggested.

Lightweight PHP Redis client supporting cache operations, automatic connection management, and complete Redis functionality. Built on native Redis extension, providing stable and reliable cache operation experience.

v1.0.0 2025-08-24 09:03 UTC

This package is auto-updated.

Last update: 2026-10-25 07:45:34 UTC


README

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