You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by pascal barbedor <pa...@laposte.net> on 2002/09/06 00:12:13 UTC

caching dynamic content in the reverse proxy

Hi

following a recipe in modperl doc I have setup a front end plain apache "reverse proxy" + a back end modperl enabled.

the front end has proxy cache enabled.
any static content that is served by a default-handler from the backend server is well cached by the front one.

but any content sent by a modperl handler is not cached although I set headers Last-Modified and Expires to compatibles dates (with Apache::Util::ht_time) and Cache-content to public from the modperl handler with $r->header_out..


Also I wondered is the formatting of dates by ht_time (mer., 12 sept. 2002 12:20:01 GMT) by default is the "RFC one" ie the abbreviation point after day and month needed or not ?
in any case i have tried both form without success for caching.


Has any one succeeeded is caching dynamic content in this configuration

thanks
pascal

winxp
perl561/modperl126/apache1326




Re: Apache::Util::ht_time outputs dates in local language

Posted by pascal barbedor <pa...@laposte.net>.

> This function wraps an apache function (apr_ht_time()) which in
> turn uses strftime() to do the conversion.
>
> Try changing your LC_TIME or LANG variable before you start your
> web server.  Perhaps start by setting LANG=C and go from there.
>
> Consult the strftime() man page for details on the interaction
> between the environment variables and the time output.
>
on win XP
I tried "no locale " in the perl script
and LANG=C in ENV before starting Apache

since none worked I just wrote a little function to get correct date in
english
thanks
pascal





Re: Apache::Util::ht_time outputs dates in local language

Posted by Paul Lindner <li...@inuus.com>.
On Fri, Sep 06, 2002 at 05:03:32PM +0200, pascal barbedor wrote:
> >
> > When I have caching problems, I run my pages through cachability to find
> out
> > where they are failing. Check it out at:
> >
> >   http://www.web-caching.com/cgi-web-caching/cacheability.py
> >
> > It reports on page headers as well as gives useful info like the
> following:
> >
> 
> Hi thanks
> 
> this helped me determine why the cache did not work
> is it because the date format of Expires or Last-Modified was not RFC
> correct
> 
> I noted on the occasion that Apache::Util::ht_time()
> outputs dates in locale language format (french for me)
> Mar, 12 Sept 2002 18:50:20 GMT
> instead of english ones

This function wraps an apache function (apr_ht_time()) which in
turn uses strftime() to do the conversion.

Try changing your LC_TIME or LANG variable before you start your
web server.  Perhaps start by setting LANG=C and go from there.

Consult the strftime() man page for details on the interaction
between the environment variables and the time output.

Cheers,
Paul

-- 
Paul Lindner    lindner@inuus.com   ||||| | | | |  |  |  |   |   |

    mod_perl Developer's Cookbook   http://www.modperlcookbook.org/
         Human Rights Declaration   http://www.unhchr.ch/udhr/

Apache::Util::ht_time outputs dates in local language

Posted by pascal barbedor <pa...@laposte.net>.
>
> When I have caching problems, I run my pages through cachability to find
out
> where they are failing. Check it out at:
>
>   http://www.web-caching.com/cgi-web-caching/cacheability.py
>
> It reports on page headers as well as gives useful info like the
following:
>

Hi thanks

this helped me determine why the cache did not work
is it because the date format of Expires or Last-Modified was not RFC
correct

I noted on the occasion that Apache::Util::ht_time()
outputs dates in locale language format (french for me)
Mar, 12 Sept 2002 18:50:20 GMT
instead of english ones


is there a way to correct this ?
thanks
pascal





Re: can't restart server

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Fri, 6 Sep 2002, Ben Mathews wrote:

> I'm running mod_perl on windows ("Apache/2.0.40 (Win32)
> mod_perl/1.99_05-dev Perl/v5.6.1") and it refuses to restart or stop the
> service.  If I try, the system will eventually give me the blue screen
> of death and crash.
> 
> Has anyone had a similar experience or know the solution?

Does the service start up without problem? Are you using
any non-standard modules other than mod_perl?

-- 
best regards,
randy kobes


can't restart server

Posted by Ben Mathews <bm...@wilcoxassoc.com>.
I'm running mod_perl on windows ("Apache/2.0.40 (Win32)
mod_perl/1.99_05-dev Perl/v5.6.1") and it refuses to restart or stop the
service.  If I try, the system will eventually give me the blue screen
of death and crash.

Has anyone had a similar experience or know the solution?
 


Re: caching dynamic content in the reverse proxy

Posted by Charlie Garrison <ga...@zeta.org.au>.
Good afternoon,

On 6/9/02 at 12:12 AM, pascal barbedor <pa...@laposte.net> wrote:

>but any content sent by a modperl handler is not cached although I set headers 
>Last-Modified and Expires to compatibles dates (with Apache::Util::ht_time) and 
>Cache-content to public from the modperl handler with $r->header_out..
>
>Has any one succeeeded is caching dynamic content in this configuration

When I have caching problems, I run my pages through cachability to find out
where they are failing. Check it out at:

  http://www.web-caching.com/cgi-web-caching/cacheability.py

It reports on page headers as well as gives useful info like the following:

  This object doesn't have any explicit freshness information set, so a
  cache may use Last-Modified to determine how fresh it is with an
  adaptive TTL (at this time, it could be, depending on the adaptive
  percent used, considered fresh for: 2 weeks 20 hr (20%), 5 weeks 2
  days (50%), 10 weeks 4 days (100%)). It can be validated with
  Last-Modified.

The site is a great resource for a variety of caching issues.

Charlie
-- 
   Charlie Garrison    garrison@zeta.org.au
   PO Box 141, Windsor, NSW 2756, Australia