Download the PHP package inspirum/mcrouter without Composer

On this page you can find all versions of the php package inspirum/mcrouter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mcrouter

Memcached with Mcrouter support for Laravel

Created as part of inspishop e-commerce platform by inspirum team.

Latest Stable Version Build Status Coverage Status Quality Score PHPStan Total Downloads

Memcached cache store implementation for Laravel framework optimized to work with Mcrouter.

System requirements

Installation

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.

On newer versions Laravel will automatically register via Package Discovery.

Config Files

In order to edit the default configuration you may execute:

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

Or you can used environment variables:

Usage example

Cache tags are automatically prefixed with Mcrouter shared prefix.

Package support additional prefixes which can be used on Mcrouter routing prefix.

Cache tags static cache

Mcrouter configuration

This configuration example is for multiple Memcached servers, one of which is local, such as a typical Kubernetes cluster. We only want to use the local server (on the same node as pod), if possible, to achieve the lowest latency, but to invalidate the cache key on each server.

Tagged cache flush method (cache()->tags(['bop', 'zap'])->flush()) do not use delete operation on Memcached server but update tag cached values instead.

All operations with shared prefix (/default/shr/) and all delete operations are send to each nodes with AllFastestRoute handle, rest of the operations are send only to local server(s) with PoolRoute handle.

Instead of AllFastestRoute you can use AllSyncRoute or AllAsyncRoute handle.

Kubernetes example

Example of Memcached with Mcrouter used on Kuberentes cluster with three nodes (10.80.10.1, 10.80.10.2, 10.80.10.3).

Using DaemonSet resource ensures that Memcached and Mcrouter will be available on each server (on ports 11211 and 11212).

You can use status.hostIP to inject current node IP to pod to use to connect to local Memcached/Mcrouter server.

Testing

To run unit tests, run:

To show coverage, run:

Contributing

Please see CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of mcrouter with dependencies

PHP Build Version
Package Version
Requires ext-memcached Version *
php Version >=7.1
illuminate/cache Version ^5.3|^6.0|^7.0|^8.0
illuminate/session Version ^5.3|^6.0|^7.0|^8.0
illuminate/support Version ^5.3|^6.0|^7.0|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package inspirum/mcrouter contains the following files

Loading the files please wait ....