The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MmapHandler - Example Apache handler using Apache::Mmap

SYNOPSIS

 <Files ~ "/some/htdocs/dir/images/.*(gif|jpe?g|png)$">
 SetHandler perl-script
 PerlHandler MmapHandler
 </Files>

DESCRIPTION

This module is an example handler showing how Apache::Mmap can be used. Any file requested will be mmap'd into the httpd's memory on the first request. Subsequent requests will simply send the version already in memory.

If you want to handle file types other than the big three image files, add lines which set $ctype in the handler sub correctly.

CONFIGURATION

Place lines similar to those shown above in your Apache config.

AUTHOR

Mike Fletcher, lemur1@mindspring.com

SEE ALSO

Apache::Mmap(3), Apache(3), mod_perl(3), mmap(2), perl(1).