This is a repost from the Content Management subgroup. Not sure where to post memcached related queries, so I am trying the technologies I use one by one in the hopes that someone will have a solution or maybe some advice.
My knowledge of Memcached is reasonably limited outside of using it via PHP, so I was hoping someone had some insight.
My setup is Centos/Apache/Mysql/PHP. I have installed memcached and am using the following line to start it in my /etc/init.d script:
memcached -d -p 11211 -u root -c 4096 -m 2048
The problem is quite simple. Regardless of what I use as a timeout for any of my pages, it works for anywhere between 1 minute and 5 minutes then hits the DB again. The majority of my pages are cached for 24 hours, while others for 30 minutes.
My code for caching is very simple, and I cache everything in seconds using code similar to the following for my parameter: 60*60*24.
Does anyone have any idea what I should look at? Maybe I should dump Memcached for something else? I am open to any suggestions, although I would prefer to stick with memcached simply due to the amount of work it will take to switch it out. Is there a way to monitor Memcached to see what is currently being stored and why things are being cleared?