Memcached - Create Another Process

I often find that I have to start more than one process for memcached when I'm developing a web application. Especially when I have to create unit test for the application. I know that I can run only one memcache process both for test and development environment. But, the data retrieved from it will be mess up and I have to restart the memcache process. How do I solve this problem?

I solve this problem by configuring test environment to use different memcached. In order to do this, I have to start a memcache process with different port in the same server using the following command

memcached -p 11211 -d
memcached -p 11212 -d

To make sure that there are two different memcached run in the same server, we can use the following Linux command.

ps -ef | grep memcached