Howto: CodeIgnitor with Amazon ElastiCache


Can you please tell me how to integrate my Web-application developed on Codeigniter to utilize Amazon ElastiCache.

Quote:CI_VERSION: 1.7.1

I never used Memcache before. How to do it ? Steps ?
What will happen if I enable this with Zend Cache ?

Note: my application is running on Amazon EC2 also.

Good question? Did you get anywhere on this?

[eluser]Ben Bowler[/eluser]
I'm looking at this too. We should be able to use the inbuild Cache driver with memcache but as of yet I've yet to get it working.

I'll update.

You could use inbuilt memcached driver from CodeIgniter. First step, follow instruction to setup ElastiCache (if you haven't) here

After that, create config file in application/config/memcached.php like this (change to your own setup)

$config['memcached'] = array(
'hostname' => 'aws.endpoint.cache.hostname',
'port' => 11211,
'weight' => 1

to enable cache, add this line
$this->load->driver('cache', array('adapter' => 'memcached', 'backup' => 'dummy'));
in your controller

visit CodeIgniter cache driver documentation on how to use cache driver (get, save, delete, etc) here


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.