Skip to content

Yii2 component for AWS Elasticache Memcache without node discovery plugin

License

Notifications You must be signed in to change notification settings

urbanindo/yii2-elasticmemcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-elasticmemcache

Yii2 component for AWS Elasticache Memcache without node discovery plugin

Latest Stable Version Total Downloads Latest Unstable Version Build Status

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

About

Yii2 component for AWS Elasticache Memcache without node discovery plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages