What is Elastic Cache :
Elastic cache is a web service that makes it easy to manage and scale a distributed in memory cache environment in the cloud.
How it works:
1.Configuraton with AWS console
2.Need to Configure the Elastic-Cache Cluster Client in the server.
In order to take advantage of auto discovery .
3. Sample PHP application code.
* Sample PHP code to show how to integrate with the Amazon ElastiCcache
* Auto Discovery feature.
* @author Azeem
echo “Hi ,This is elastic memcache clastering system sample<br>”;
$server_endpoint=’test-memcached.xxxxx.yyyyyy.zzzz.cache.amazonaws.com‘; //this is elastic memcache
$server_port=11211; //this is the prot we have configured
$client = new Memcached();
$client->addServer($server_endpoint, $server_port); //initializing the server configuration
$client->set(‘my_key’, ‘My Value is at elastic memcache ‘.time()); //setting the key with value
echo ‘Data in the cluster: [‘ . $client->get(‘my_key’) . ‘]’; //getting the value