views:

91

answers:

2

I just wanted to know if memcache is linked to apache or it runs as a separate process. So, will restarting apache clear my memcache contents or not?

+2  A: 

No. Memcache is not linked to the apache process. Memcached is a separate process.

HOWEVER, your application framework if you are using one, may flush memcache if you restart apache.

-daniel

Daniel
+1, great.. what would be the typical name for the memcache process in an unix environment?
pinaki
@pinaki memcached
Dustin
Thanks Dustin..
pinaki
+2  A: 

You can also empty memcached without restarting it:

telnet localhost 11211

11211 it the default port for memcached (if nothing responds on this port check your init script)

And within telnet:

flush_all

This will flush all stored data.

vassilis
+1.. good information.. where would the init script for memcached be??
pinaki
On RHEL linux (that's what I'm using) the init script is in /etc/init.d/memcached. The configuration (port, allocated memory, users etc) is read from /etc/memcached.conf
vassilis