urbanindo / yii2-elasticmemcache
Yii2 component for elastic memcache without node discovery plugin
1.0.1
2015-08-19 06:56 UTC
Requires
- php: >=5.5.0
- aws/aws-sdk-php: >=2.4
- yiisoft/yii2: *
Requires (Dev)
- phpunit/phpunit: 4.6.*
This package is auto-updated.
Last update: 2026-02-22 19:04:59 UTC
README
Yii2 component for AWS Elasticache Memcache without node discovery plugin
Installation
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.
Usage
'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 ] ] ]
Running Test
- copy test/template-local.php to local.php
- modify it to your aws elasticache configuration
- run
vendor/bin/phpunit --bootstrap test/bootstrap.php test/CacheTest