You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Akins <ba...@web.turner.com> on 2004/01/07 14:04:08 UTC

Save brigade and buckets

This may not be apache-dev related, but I do not know where else to ask it.

Is it possible to save an entire bucket bridade (including it's buckets) 
across requests.  I looked at  ap_save_brigade, but I'm sure that will 
work.  It seems that the brigades are always tied to a connection.

Thanks.

-- 
Brian Akins
Senior Systems Engineer
CNN Internet Technologies

Re: Save brigade and buckets

Posted by Ian Holsman <Ia...@apache.org>.
Brian Akins wrote:
> This may not be apache-dev related, but I do not know where else to ask it.
> 
> Is it possible to save an entire bucket bridade (including it's buckets) 
> across requests.  I looked at  ap_save_brigade, but I'm sure that will 
> work.  It seems that the brigades are always tied to a connection.
> 
> Thanks.
> 


Hi Brian.
you may want to look at how mod_mem_cache handles storing buckets for 
longer periods that than the request itself.

regards
Ian

Re: Save brigade and buckets

Posted by Cliff Woolley <jw...@virginia.edu>.
On Wed, 7 Jan 2004, Brian Akins wrote:

> This may not be apache-dev related, but I do not know where else to ask it.
> Is it possible to save an entire bucket bridade (including it's buckets)
> across requests.  I looked at  ap_save_brigade, but I'm sure that will
> work.  It seems that the brigades are always tied to a connection.

Brigades are tied to the pool in which they are created.  Buckets for the
most part have no inherent lifespan, other than the fact that if you leave
them in a brigade and destroy the brigade, the buckets in it will be
deleted.  (The exception is that you should "setaside" each bucket into
the new pool to make sure any underlying data lives as long as the bucket
itself does.)  Exactly what kind of lifespan are you wanting for your
brigade?  It should just be a matter of getting a pool with that lifespan,
making a brigade in it, and calling setaside on the buckets and then
moving them over to that new brigade.  That's basically what
ap_save_brigade() does.

--Cliff