fsavina/laravel-multi-memcached
最新稳定版本:v1.0.2
Composer 安装命令:
composer require fsavina/laravel-multi-memcached
包简介
Extract multiple memcached server configuration from .env file
README 文档
README
Use multiple Memcached servers in your Laravel project directly from your .env file.
Installation
Install the package in your project
$ composer require fsavina/laravel-multi-memcached
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
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
@90following 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.
统计信息
- 总下载量: 12.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-09-14