Welcome Guest, Not a member yet? Register   Sign In
Memcached With Queries Help
#1

[eluser]Dregond Rahl[/eluser]
Hey,

I'll be honest i'm not sure how to use the logic of Memcached properly for queries. For example say its a blog, we have 5 entries shown on the main page. A new entry is added, how does the Memcache of the 5 queries stored on the mainpage get updated? Do we wait for it to expire and then it gets updated, or is there something I'm missing?

I am a decent coder but my knowledge of using memcached properly is very limited, I understand how APC works with the optcode cache, but with user data as with memcached I'm not sure how to use the logic with CI.

I would really appreciate some example codes and some explanation for me to better understand how this works so I can improve my codes to use memcached properly with CI.


Thanks,
Dregond
#2

[eluser]Eric Barnes[/eluser]
Greg Aker just wrote a post about this - http://www.gregaker.net/2011/feb/12/code...g_drivers/

That should help you out.
#3

[eluser]Dregond Rahl[/eluser]
[quote author="Eric Barnes" date="1297647854"]Greg Aker just wrote a post about this - http://www.gregaker.net/2011/feb/12/code...g_drivers/

That should help you out.[/quote]

Thanks for the link I understand how how its saved, what about updating the cache? in the example the time out is 300 seconds. If expiration isn't set and its left to memcached to handle updating its data. Does it do it automatically? or there has to be an expiration for it to work right?




Theme © iAndrew 2016 - Forum software by © MyBB