PHPackages                             inspirum/mcrouter - 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. inspirum/mcrouter

AbandonedArchivedLibrary[Caching](/categories/caching)

inspirum/mcrouter
=================

v1.2.0(5y ago)34.9kMITPHPPHP &gt;=7.1CI failing

Since Jan 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/inspirum/mcrouter-php-laravel)[ Packagist](https://packagist.org/packages/inspirum/mcrouter)[ Docs](https://github.com/inspirum/mcouter-php-laravel)[ RSS](/packages/inspirum-mcrouter/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (4)Dependencies (8)Versions (5)Used By (0)

Memcached with Mcrouter support for Laravel
===========================================

[](#memcached-with-mcrouter-support-for-laravel)

**Created as part of [inspishop](https://www.inspishop.cz/) e-commerce platform by [inspirum](https://www.inspirum.cz/) team.**

[![Latest Stable Version](https://camo.githubusercontent.com/d60b1171fd9e7388b0a681295d7afa7fc9a417df517644b77f78f0d25946c539/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e73706972756d2f6d63726f757465722e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d626c7565)](https://packagist.org/packages/inspirum/mcrouter)[![Build Status](https://camo.githubusercontent.com/5a72195cd66ac01ebc90ba11cf2428a9f1882108118d831066d36ff70cde7987/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f696e73706972756d2f6d63726f757465722d7068702d6c61726176656c2f6d61737465722e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/inspirum/mcrouter-php-laravel)[![Coverage Status](https://camo.githubusercontent.com/7e1da4a467bf8dc73cb21b58e9f4e2d384f998a22a85239f7b719c4377c14de2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f696e73706972756d2f6d63726f757465722d7068702d6c61726176656c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/inspirum/mcrouter-php-laravel/code-structure)[![Quality Score](https://camo.githubusercontent.com/0537803b3b8ada563c0f06e571128cc296d34031c63a30de8d4e39a91e9a2c34/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f696e73706972756d2f6d63726f757465722d7068702d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/inspirum/mcrouter-php-laravel)[![PHPStan](https://camo.githubusercontent.com/e43e27acff50e6ee0656e0a112d484ff55f844ff10e79b3d17641033ea51d18f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374796c652d6c6576656c253230372d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265266c6162656c3d7068707374616e)](https://github.com/phpstan/phpstan)[![Total Downloads](https://camo.githubusercontent.com/6ea25783e4905ffea51d20a2268a413038db3a09b303f988953b1c854549791a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e73706972756d2f6d63726f757465722e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d626c7565)](https://packagist.org/packages/inspirum/mcrouter)[![Software License](https://camo.githubusercontent.com/9c4b8a496f41b1a60859cdf140580afd03cd0cc79e121feed3f87c7a12de6087/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696e73706972756d2f6d63726f757465722d7068702d6c61726176656c2e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d626c7565)](./LICENSE.md)

[Memcached](http://memcached.org/) cache store implementation for [Laravel framework](https://github.com/laravel/framework) optimized to work with [Mcrouter](https://github.com/facebook/mcrouter).

- Static cache for [tags](https://laravel.com/docs/master/cache#cache-tags) to reduces the number of queries to the Memcached server
- Support for Mcrouter [prefix routing](https://github.com/facebook/mcrouter/wiki/Prefix-routing-setup)
- Optimized to be used in Kubernetes cluster with Memcached server on each node to achieve the lowest latency

System requirements
-------------------

[](#system-requirements)

- [PHP 7.1+](http://php.net/releases/7_1_0.php)
- [ext-memcached](http://php.net/memcached)

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

[](#installation)

```
composer require inspirum/mcrouter
```

This package supports Laravel 5.3 or later (including Laravel 6/7/8).

For Laravel 5.4 and below it necessary to register the service provider in `config/app.php`.

```
'providers' => [
  // ...
  Inspirum\Mcrouter\Providers\McrouterServiceProvider::class,
]
```

On newer versions Laravel will automatically register via [Package Discovery](https://laravel.com/docs/master/packages#package-discovery).

### Config Files

[](#config-files)

In order to edit the default configuration you may execute:

```
php artisan vendor:publish --provider="Inspirum\Mcrouter\Providers\McrouterServiceProvider"
```

After that, `config/mcrouter.php` will be created.

```
