How do I reconnect to Memcache when forking in rails?

Posted by Daniel Huckstep on Stack Overflow See other posts from Stack Overflow or by Daniel Huckstep
Published on 2010-04-27T20:03:32Z Indexed on 2010/04/28 1:53 UTC
Read the original article Hit count: 329

Filed under:
|

I have a rails 3 application, and a script called by rails runner. This script forks and does some stuff in other processes. I do the proper thing with ActiveRecord before forking, where I disconnect-fork-reconnect and all that jazz.

My question is I also use memcache for the Rails.cache but should I be disconnecting-reconnecting that too for my forks? If so, how would I go about that in the rails way.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about memcached