NAME

Maplat::Web::StaticCache - provide static files to browser

SYNOPSIS

This module provides RAM caching of static files.

DESCRIPTION

During the reload() calls, this modules recursively loads all files in the configured directory into RAM and delivers them to the browser very fast.

It also sets chache_control and expires header to further reduce the load on the server. For multiple base directories (for example images, sounds, ...) you can use this module multiple times.

Configuration

<module>
        <modname>images</modname>
        <pm>StaticCache</pm>
        <options>
                <path>MaplatWeb/Images</path>
                <webpath>/pics/</webpath>
                <cache_control>max-age=3600, must-revalidate</cache_control>
                <expires>+1h</expires>
        </options>
</module>

get

Deliver the static, chached files.

load_dir

Internal function.

Dependencies

This module is a basic web module and does not depend on other web modules.

SEE ALSO

Maplat::Web

AUTHOR

Rene Schickbauer, <rene.schickbauer@magnapowertrain.com>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Rene Schickbauer

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.0 or, at your option, any later version of Perl 5 you may have available.