PHPackages                             fsavina/laravel-multi-memcached - 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. [Framework](/categories/framework)
4. /
5. fsavina/laravel-multi-memcached

ActiveLibrary[Framework](/categories/framework)

fsavina/laravel-multi-memcached
===============================

Extract multiple memcached server configuration from .env file

v1.0.2(8y ago)112.8k↓37.5%MITPHPPHP &gt;=5.0

Since Sep 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/fsavina/laravel-multi-memcached)[ Packagist](https://packagist.org/packages/fsavina/laravel-multi-memcached)[ Docs](https://github.com/fsavina/laravel-multi-memcached)[ RSS](/packages/fsavina-laravel-multi-memcached/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

laravel-multi-memcached
=======================

[](#laravel-multi-memcached)

[![Latest Stable Version](https://camo.githubusercontent.com/196aab955cb3221214eb5ae782af53c730dea2fbf753b0c605203ef7f4e04cd7/68747470733a2f2f706f7365722e707567782e6f72672f66736176696e612f6c61726176656c2d6d756c74692d6d656d6361636865642f762f737461626c65)](https://packagist.org/packages/fsavina/laravel-multi-memcached)[![Total Downloads](https://camo.githubusercontent.com/f324264b37e36cfddfd8c25aa2127adfd6c3376e1b45cbcc596fd24212a67bee/68747470733a2f2f706f7365722e707567782e6f72672f66736176696e612f6c61726176656c2d6d756c74692d6d656d6361636865642f646f776e6c6f616473)](https://packagist.org/packages/fsavina/laravel-multi-memcached)[![License](https://camo.githubusercontent.com/a69380fc65f207cb0a8df8f795e3b52c834e6d775cca10713791c18adc6f152c/68747470733a2f2f706f7365722e707567782e6f72672f66736176696e612f6c61726176656c2d6d756c74692d6d656d6361636865642f6c6963656e7365)](https://packagist.org/packages/fsavina/laravel-multi-memcached)

Use multiple Memcached servers in your Laravel project directly from your .env file.

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

[](#installation)

Install the package in your project

```
$ composer require fsavina/laravel-multi-memcached
```

Usage
-----

[](#usage)

In your `config/cache.php` file, change to Memcached server configuration calling the provided helper function `laravel_memcached_servers`:

```
'memcached' => [
  'driver' => 'memcached',
  'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
  [...]
  'servers' => laravel_memcached_servers ()
]
```

Configuration
-------------

[](#configuration)

In your `.env` file add the following variables:

```
#comma-separated list of Memcached servers
MEMCACHED_HOST=my.first.memcached.server.com@100,my.second.memcached.server.com:11222@90

#optional - default Memcached port
MEMCACHED_PORT=11211
```

For every provided server you can specify:

- the **port**: use the standard format `:11211`, following the host name;
- the **weight**: use the format `@90` following the host name and the port (if present).

Both **port** and **weight** are optional. You can use `MEMCACHED_PORT` for the default port, which will be used for all the servers. The default weight, if not specified, is 100.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~86 days

Total

3

Last Release

2990d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d271042667fe70c2ba939f18a40ce0f27429471f532cadf324a0e87617ab3009?d=identicon)[fsavina](/maintainers/fsavina)

---

Top Contributors

[![fsavina](https://avatars.githubusercontent.com/u/4038144?v=4)](https://github.com/fsavina "fsavina (8 commits)")

---

Tags

cachinglaravellaravel-5-packagememcachedphpframeworklaravelcachedotenvmemcached

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fsavina-laravel-multi-memcached/health.svg)

```
[![Health](https://phpackages.com/badges/fsavina-laravel-multi-memcached/health.svg)](https://phpackages.com/packages/fsavina-laravel-multi-memcached)
```

###  Alternatives

[hemp/presenter

Easy Model Presenters in Laravel

247592.6k1](/packages/hemp-presenter)[rahulalam31/laravel-abuse-ip

Block ip address of all spammer's around the world.

27431.5k](/packages/rahulalam31-laravel-abuse-ip)[yiisoft/cache-memcached

Yii Caching Library - Memcached Handler

1316.2k](/packages/yiisoft-cache-memcached)

PHPackages © 2026

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