PHPackages                             idct/php-rapid-cache-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. idct/php-rapid-cache-client

ActiveLibrary[Caching](/categories/caching)

idct/php-rapid-cache-client
===========================

High-performance Redis/Valkey-backed PSR-16 cache client for PHP, extended with tag-based invalidation, queues, sets, sorted sets, and atomic counters.

v1.0.1(1mo ago)00[1 PRs](https://github.com/ideaconnect/php-rapid-cache-client/pulls)MITPHPPHP ^8.2CI passing

Since May 27Pushed 1w agoCompare

[ Source](https://github.com/ideaconnect/php-rapid-cache-client)[ Packagist](https://packagist.org/packages/idct/php-rapid-cache-client)[ RSS](/packages/idct-php-rapid-cache-client/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (2)Dependencies (10)Versions (4)Used By (0)

IDCT Rapid Cache Client
=======================

[](#idct-rapid-cache-client)

[![Tests status](https://github.com/ideaconnect/php-rapid-cache-client/workflows/CI/badge.svg)](https://github.com/ideaconnect/php-rapid-cache-client/workflows/CI/badge.svg)[![codecov](https://camo.githubusercontent.com/820870eb02ea171f4ccf057061033a2555b0327274a4ba672c0f8152bd1024f6/68747470733a2f2f636f6465636f762e696f2f67682f69646561636f6e6e6563742f7068702d72617069642d63616368652d636c69656e742f67726170682f62616467652e7376673f746f6b656e3d764c77567162516b3566)](https://codecov.io/gh/ideaconnect/php-rapid-cache-client)[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/caa7e3aaf250d15343145f15a860d7f74dee020053228dffd5a878c1880af4db/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f69646561636f6e6e6563742f7068702d72617069642d63616368652d636c69656e743f6c6162656c3d6c617465737425323076657273696f6e26736f72743d73656d766572)](https://camo.githubusercontent.com/caa7e3aaf250d15343145f15a860d7f74dee020053228dffd5a878c1880af4db/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f69646561636f6e6e6563742f7068702d72617069642d63616368652d636c69656e743f6c6162656c3d6c617465737425323076657273696f6e26736f72743d73656d766572)[![PHP version](https://camo.githubusercontent.com/8f0af9c5395ae4ef8ba7a7ad65fa61c44927ea9c3eb3be91a13c678254f29bd4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e322d383839324246)](https://camo.githubusercontent.com/8f0af9c5395ae4ef8ba7a7ad65fa61c44927ea9c3eb3be91a13c678254f29bd4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e322d383839324246)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)

**IDCT Rapid Cache Client** is a high-performance Redis-backed caching library for PHP. At its core it is a clean [PSR-16 (SimpleCache)](https://www.php-fig.org/psr/psr-16/)implementation, so it drops straight into any framework or library that speaks the standard cache contract. On top of that baseline it adds the features real applications keep reaching for but PSR-16 leaves out: **tag-based grouping and invalidation, FIFO queues, sets, sorted sets, and atomic counters** - all exposed through the `CacheServiceInterface` contract.

The package ships **two clients** that share the same PSR-16 + tagging surface but differ in how values land in Redis:

- **`RapidCacheClient`** — the general-purpose client. Stores any serializable PHP value (objects, nested arrays, `DateTime`, …) as a single Redis STRING using the compact binary `ext-igbinary` serializer. Adds queues, sets, sorted sets, and whole-value counters on top.
- **`HashRapidCacheClient`** — purpose-built for flat associative arrays of scalars. Each value is stored as a native Redis HASH so individual fields can be read, written, or atomically incremented without round-tripping the whole record (`HGET`/`HSET`/`HINCRBY`). No serializer — the wire format is plain Redis hash fields.

Speed comes from two deliberate choices: both clients talk to Redis (or any Redis-compatible server such as [Valkey](https://valkey.io/)) through the native `ext-redis` C extension, and the string client serializes values with `ext-igbinary` so arbitrary PHP values round-trip losslessly and cheaply. Bulk operations are pipelined and chunked, connections are established lazily and re-established transparently, and every Redis-level error is translated into a PSR-16 exception so your calling code stays backend-agnostic.

Quick example
-------------

[](#quick-example)

```
