urbanindo / yii2-elasticmemcache
Yii2 component for elastic memcache without node discovery plugin
Installs: 19 301
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 6
Forks: 1
Open Issues: 0
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: 2024-10-22 16:00:29 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