Bill Moseley <[EMAIL PROTECTED]> writes:

> At 11:58 AM 11/08/01 -0800, Gisle Aas wrote:
> >Bill Moseley <[EMAIL PROTECTED]> writes:
> >> Also, how do I determine how large to set the connection cache?  
> >
> >How many connections do you want to allow out at any time?
> >LWP can't keep more than one of them busy at any time.
> >I would not set this number higher than say 4.
> I hope I'm not misunderstanding.  In my example, I'm making a number of
> requests to two servers, where I want keep alives.   So, I'd use
>        keep_alive => 2,
> And then for requests to other servers where I don't want keep_alive I can
> add the "Connection: close" header.  Is that correct?


> I suppose another method would be to use two separate $ua's - one with
> keep-alives, and the other without.


You can also just provide your own 'conn_cache' object.  All that is
needed is an object that implements the:

   $cache->deposit($type, $key, $conn)
   $conn = $cache->withdraw($type, $key)

interface.  You can then refuse deposits for connections where you
don't want keep-alives by looking at the key.


Reply via email to