I want to start using memcache with PHP (on Ubuntu 9.10). There are lots of info online which appear to show how to do this. Suprisingly though, none of the articles (I have seen so far), explicitly state whether you need to RUN the memcache process BEFORE attempting to use it or whether by simply calling new MemCache() via the PHP client library, a process will be spawned (if not already running).
From the various docs I have read on this so far, these are the steps that I think make sense:
- Install memcache on your machine (there are several docs showing how to do this)
- Modify your php.ini file and set the memcache related consts/flags to the values that make sense for your environment 3. Create an init script in ini.d to start memcache as a daemon
- Restart Apache daemon
Number 3 is the part that I need confirmation on, because none of the docs I have seen so far mentions the lifespan of the memcache process.
Can someone experienced in this confirm if this is the correct steps? Also if I have missed a step, let me know.
As an aside, since I am relatively new to Linux, I would be grateful if someone could post an example of an init script that would be needed to run the memcache daemon process (assuming that the steps I have outlined above are correct)