I use capistrano to deploy my app to a machine that uses memcache. I want capistrano to clear memcache when it deploys a new version of the site.
+2
A:
Don't know capistrano, but can't you just kill the memcached process and spawn a new one? Better probably for removing fragmentation also.
Toad
2009-03-13 16:16:22
capistrano is deployment automation tool, so that restart would also be done by capistrano.
vartec
2009-03-13 16:33:07
A:
Just don't. Memcache is not supposed to be restarted. Why would you want to clear your memcache?
If you really want to wipe out your cache at each release, namespace all your keys with your application version.
Yann
2009-03-29 17:01:43
+1
A:
Take a look at this: http://www.strictlyuntyped.com/2008/06/clearing-memcache-without-restart.html
Emerson Macedo
2010-02-26 01:29:13