Welcome Guest, Not a member yet? Register   Sign In
Howto: CodeIgnitor with Amazon ElastiCache
#1

[eluser]Unknown[/eluser]
Hello,

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.
#2

[eluser]Unknown[/eluser]
Good question? Did you get anywhere on this?

#3

[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. http://ellislab.com/codeigniter/user-gui...#memcached

I'll update.
#4

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

http://docs.aws.amazon.com/AmazonElastiC...ignUp.html

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

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

to enable cache, add this line
Code:
$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

[email=http://ellislab.com/codeigniter/user-guide/libraries/caching.html]http://ellislab.com/codeigniter/user-guide/libraries/caching.html[/email]




Theme © iAndrew 2016 - Forum software by © MyBB