Hello,
I saw someone asked this question on memcached's list.And I also want to know
the answer of it.
Does anyone here have the experience on this item?Thanks.
Quote:
I'm using memcached under mod_perl.Can I "new" a memcached object at
modperl's startup file and share it among all the apache ch
On Feb 26, 2007, at 11:19 PM, Jeff Pang wrote:
Hello,
I saw someone asked this question on memcached's list.And I also
want to know the answer of it.
Does anyone here have the experience on this item?Thanks.
Yes.
It seems to work fine with a single memcached connection for
everything (
On 2/27/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
It seems to work fine with a single memcached connection for
everything ( instantiated pre-fork ).
That seems very unlikely to me, unless you are using it in a way that
doesn't cause it to connect before forking. You can't open sockets,
f
>I suggest loading the module in the parent but not opening any
>connections until after the fork.
>
How to write the codes then?Currently I've written it as:
sub handler
{
my $r = shift;
my $q = Apache::Request->new($r);
...
my $memd = new_memcached(); # open the socket to mem
On Feb 27, 2007, at 8:40 AM, Perrin Harkins wrote:
That seems very unlikely to me, unless you are using it in a way that
doesn't cause it to connect before forking. You can't open sockets,
fork and then use the same socket in both processes.
Right now I connect pre-fork in the parent -- it w
Ok. I just went through the CPAN code...
at least in Cache::Memcached, no socket connection is made until a
get. in fact, they all seem to be made as needed, and not cached.
in any event, I use this code under MP2 , and do all my get/sets as
MyApp::Functions::Memcached::memcached_