PHPackages                             marufmax/deja-vu - 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. marufmax/deja-vu

ActiveLibrary[Caching](/categories/caching)

marufmax/deja-vu
================

Caching with redis sentinal, master and slave. Supports PHPRedis client

1.0.1(5y ago)83MITPHPPHP ^7.2.5

Since Aug 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/marufmax/deja-vu)[ Packagist](https://packagist.org/packages/marufmax/deja-vu)[ RSS](/packages/marufmax-deja-vu/feed)WikiDiscussions master Synced 2d ago

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

[![](./dejavu.svg)](https://github.com/marufmax/dejavu)

 Laravel - DejaVu

Laravel Redis sentinel support for High Availability ⬆️ ⬆️ 🔥
------------------------------------------------------------

[](#laravel-redis-sentinel-support-for-high-availability-arrow_up-arrow_up-fire)

### Features

[](#features)

- Supports Multiple Sentinel, Slaves and Master
- Reading to slaves and writing to master if there is instance available it will send request to that instance
- Connection pooling by default, so there is no multiple TCP connection
- Master and Slave Auto Discovery and random traffic passing

Installation
------------

[](#installation)

This package requires minimum **PHP 7.2** and **Laravel 7.x** version. And **PHPRedis** according to your PHP Version.

#### **Install PHPRedis (Skip if you have it)**

[](#install-phpredis-skip-if-you-have-it)

**Installing PHP-Pear**

```
apt install -y php-pear
```

**Installing Redis Client**

```
printf "no\n" | pecl install redis
```

**Adding Extension to php module**

```
echo "extension=redis.so" > /etc/php/7.YOUR_PHP_VERSION/mods-available/redis.in

```

**Symlinking with FPM and CLI**

```
ln -sf /etc/php/7.YOUR_PHP_VERSION/mods-available/redis.ini /etc/php/7.YOUR_PHP_VERSION/fpm/conf.d/20-redis.ini
ln -sf /etc/php/7.YOUR_PHP_VERSION/mods-available/redis.ini /etc/php/7.YOUR_PHP_VERSION/cli/conf.d/20-redis.ini

```

**Restarting PHP Service**

```
systemctl restart php7.YOUR_PHP_VERSION-fpm.service

```

#### Installing DejaVu Package

[](#installing-dejavu-package)

run this command from terminal:

```
composer require marufmax/dejavu
```

Add those to your `.env` file:

```
# Redis Configuration (Use comma Separated if have multiple)
REDIS_SENTINELS=localhost,localhost
REDIS_SENTINELS_PORTS=27379,27380
REDIS_PASS=AStrongPassword

```

Here there is two redis sentinels server. Please put only sentinel server not any master or slaves IPs. Due to redis sentinel limitation please set same password to every host. see

Quick Usages
------------

[](#quick-usages)

Simply use `DejaVu` Facade instead of `Cache` Facade. Below is a very simple example

```
\MarufMax\DejaVu\Facades\DejaVu::put('hi', 'hello', 36);

dd(\MarufMax\DejaVu\Facades\DejaVu::get('hi'));
```

Thanks 🐱

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2095d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7fb7ebc0e5248f15ddbc053f744e6be86259261962b8b5ef43389d29e99a8953?d=identicon)[marufalom](/maintainers/marufalom)

---

Top Contributors

[![marufmax](https://avatars.githubusercontent.com/u/7222229?v=4)](https://github.com/marufmax "marufmax (1 commits)")

### Embed Badge

![Health badge](/badges/marufmax-deja-vu/health.svg)

```
[![Health](https://phpackages.com/badges/marufmax-deja-vu/health.svg)](https://phpackages.com/packages/marufmax-deja-vu)
```

###  Alternatives

[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.2M51](/packages/spatie-laravel-responsecache)[genealabs/laravel-model-caching

Automatic caching for Eloquent models.

2.4k4.8M26](/packages/genealabs-laravel-model-caching)[mikebronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k127.1k1](/packages/mikebronner-laravel-model-caching)[illuminate/cache

The Illuminate Cache package.

12835.6M1.4k](/packages/illuminate-cache)[laragear/cache-query

Remember your query results using only one method. Yes, only one.

272122.8k](/packages/laragear-cache-query)[namoshek/laravel-redis-sentinel

An extension of Laravels Redis driver which supports connecting to a Redis master through Redis Sentinel.

38679.0k](/packages/namoshek-laravel-redis-sentinel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
