Re: [MP2] How to turn off caching?

[prev] [thread] [next] [Date index for 2005/05/31]

From: Issac Goldstand
Subject: Re: [MP2] How to turn off caching?
Date: 08:50 on 31 May 2005
As more of a hack than a necessarily good practice, I've found that
sending a newline (in addition to $|=1) sometimes helps.  I think the
problem here is more that the browser doesn't necessarily render content
every single time some data comes in over the socket, but maybe waits
for logical looking breakpoints to render.   Someone who knows browsers
better will probably correct me, but that's what I've found.

Newlines are good because in general (unless you're in a NOBR block,
CODE block, etc ) the browser won't display it, but it seems to trigger
the browser to do something.

  Issac

Foo Ji-Haw wrote:

> Hello Rodger,
>
> Thanks for the advice. I'm concerned that this sounds like a lot of
> search-and-replace for my application. I wonder if there is a cleaner
> method that simply toggles off buffering?
>
> Anyone has any ideas on this?
>
> Rodger Castle wrote:
>
>>> If I am not mistaken, modperl tends to cache all output until the
>>> script is completed, then it sends out the page. If I want to (for
>>> example) print a period (.) back to the browser every second, what
>>> do I need to do? I tried $| but it does not work.
>>>   
>>
>>
>> I fought with this for a while, too. You can use the 'bucket brigade'
>> technique. I'm a bit green, so someone with more experience could
>> expound more.  Here's a snippet:
>>
>> sub send_response_body
>> {
>>    my ( $r, $data ) = @_;
>>       my $bb = APR::Brigade->new ( $r->pool,
>>                  $r->connection->bucket_alloc );
>>    my $b = APR::Bucket->new ( $data );
>>    $bb->insert_tail ($b);
>>    $r->output_filters->fflush ( $bb );
>>    $bb->destroy;
>> }
>>
>> Hope this helps.
>>
>> Rodger
>>
>>  
>>

(message missing)

Apache2::Reload problems
Mark 06:42 on 25 May 2005

Re: Apache2::Reload problems
Stephane GUIBOUD-RIBAUD 06:48 on 25 May 2005

Re: Apache2::Reload problems
Mark 15:53 on 25 May 2005

Re: Apache2::Reload problems
Stas Bekman 17:37 on 25 May 2005

Should I use Package or Modual or what?
Luinrandir Insight 17:19 on 25 May 2005

Re: Should I use Package or Modual or what?
Perrin Harkins 17:16 on 25 May 2005

Re: Should I use Package or Modual or what?
Perrin Harkins 17:57 on 25 May 2005

a mystery.. need help
Luinrandir Insight 08:36 on 29 May 2005

[OT] Re: a mystery.. need help
Frank Maas 10:37 on 29 May 2005

Re: Apache2::Reload problems
Philippe M. Chiasson 09:24 on 25 May 2005

Re: Apache2::Reload problems
Mark 15:30 on 25 May 2005

Re: a mystery.. need help
David Dick 05:37 on 29 May 2005

Re: a mystery.. need help
Luinrandir Insight 02:10 on 30 May 2005

Re: a mystery.. need help
Tom Schindl 07:55 on 30 May 2005

Re: a mystery.. need help
jonathan vanasco 16:23 on 30 May 2005

Re: a mystery.. need help
Luinrandir Insight 20:15 on 30 May 2005

[MP2] How to turn off caching?
Foo Ji-Haw 04:23 on 31 May 2005

Re: [MP2] How to turn off caching?
Rodger Castle 05:11 on 31 May 2005

Re: [MP2] How to turn off caching?
Foo Ji-Haw 07:45 on 31 May 2005

Re: [MP2] How to turn off caching?
Torsten Foertsch 09:31 on 31 May 2005

Re: [MP2] How to turn off caching?
Issac Goldstand 08:50 on 31 May 2005

Generated at 20:12 on 05 Jun 2005 by mariachi v0.52