Practical mod_perl / HTML Book / books


previous page: 16.4.4. POST Requestspage up: HTML Version of the booknext page: 16.6. References

16.5. Avoiding Dealing with Headers


Search







modperlbook.org


 HTML Book


 PDF Book


 Download Code


 Table of Contents


 Errata


 mod_perl2 User's Guide


 Sitemap





Add to Google



Creative Commons License


Written by
Eric Cholet (Logilune)
and Stas Bekman (StasoSphere).

Hosted by ibiblio.org.



There is another approach to dynamic content that is possible with mod_perl. This approach is appropriate if the content changes relatively infrequently, if we expect lots of requests to retrieve the same content before it changes again, and if it is much cheaper to test whether the content needs refreshing than it is to refresh it.

In this situation, a PerlFixupHandler can be installed for the relevant location. This handler must test whether the content is up to date or not, returning DECLINEDso that the Apache core can serve the content from a file if it is up to date. If the content has expired, the handler should regenerate the content into the file, update the $r->finfostatus and still return DECLINED, which will force Apache to serve the now updated file. Updating $r->finfo can be achieved by calling:

$r->filename($file); # force update of the finfo structure

even if this seems redundant because the filename is the same as $file. This is important because otherwise Apache would use the out-of-date finfo when generating the response header.

 

Continue to:

  • prev: 16.4.4. POST Requests
  • Table of Contents
  • next: 16.6. References

Tags

mod_perl, modperl, Apache, perl, cgi, html, mod_perl, e-commerce, scalability, free, open source, OSS, apache, squid, high availability, modperl, linux, unix, Web, www, mod_perl, webserver, admin, apache, book, webmaster, tools, modperl, guide, docs, documentation, help, mod_perl, perl, information, apache, script, errata, eric cholet, perl, apache, mod-perl, stas bekman, mod_perl, cool, perl, Apache, performance, speed, choice




Other projects to check out: meta-religion.com is for those interested in Religious, Spiritual and Esoteric Phenomena. i-want-a-better.com is a community of people discussing what they would like to be improved in their lives and things they use and interact with. You may also want to find a healer in your area or read articles on variety of topics.






TOP
previous page: 16.4.4. POST Requestspage up: HTML Version of the booknext page: 16.6. References

© 2007 StasoSphere

[ Privacy Policy ] [ Terms of Use ] [ About Authors ] [ Search ]

Last modified Tue Feb 24 12:54:56 2009