Yii2 component for AWS Elasticache Memcache without node discovery plugin
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist urbanindo/yii2-elasticmemcache "*"
or add
"urbanindo/yii2-elasticmemcache": "*"
to the require section of your composer.json
file.
'components' => [
'cache' => [
'class' => UrbanIndo\Yii2\ElasticMemcache\Cache::class,
'serverConfigs' => [
[
'host' => 'CacheClusterConfiguration1.cache.amazonaws.com', // modify this
'port' => 11211,
'weight' => 60,
],
[
'host' => 'CacheClusterConfiguration2.cache.amazonaws.com', // modify this
'port' => 11211,
'weight' => 40,
]
],
'cache' => [
'class' => yii\caching\FileCache::class
]
]
]
vendor/bin/phpunit --bootstrap test/bootstrap.php test/CacheTest
Comments