Re: How to keep persistent socket connections?

Steve Hull
Thu, 21 May 2009 18:41:16 -0000

> Today I''m going to try opening the socket and then
> storing the socket in the Rails cache, in order to see if that socket
> remains open and useable even while just sitting in the cache (I''m
kind
> of thinking it won''t).

Yeah, that didn''t work because caching the connection makes it
immutable, which means you can no longer write data to it.  But you know
what I think *will* work?  Storing the connection(s) as class vars.  So
I''m trying that next.  I will report back here afterward for anyone who
might be interested.