views:

1237

answers:

2

Hi all,

How to use memcached from codeigniter, and how to store session data to memcached. Please help me.

Thanks

+1  A: 

Here is an introduction to memcached and PHP:

enhance_php_session_management

As far as using memcached from CI, I imagine you would want to either add the caching code directly into your models, or from your Controllers you would want to check the cache before querying data from a model.

Justin Ethier
thanks for your useful information!
noname.cs
+3  A: 

Here is the link to my memcached_library for codeigniter

http://github.com/trs21219/memcached-library

let me know what you think and if you have any issues please raise them in the issues section of the github repository

Tom Schlick
thanks alot about the library. I'm going to use memcached as main cache layer and use memcached to store session data. Have you ever use memcached to store session data?
noname.cs
no but i never thought of it. i dont think it would be too difficult to overload the session library to append add and delete to/from memcache before and after the queries that the session class normally uses. now that you mention this im going to tinker around at work doing this for our applications... good idea :)
Tom Schlick