Ingy döt Net > Plack-Middleware-Cache-0.12 > Plack::Middleware::Cache

Download:
Plack-Middleware-Cache-0.12.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.12   Source  

NAME ^

Plack::Middleware::Cache - Use Cached Responses of Certain URIs

SYNOPSIS ^

    builder {
        enable "Cache",
            match_url => [
                '^/foo/',
                '\\?.*xxx=.*',
            ],
            cache_dir => '/tmp/plack-cache';
        $app;
    };

DESCRIPTION ^

This middleware allows you to cache expensive and non-changing responses from URIs that match a list of regular expression patterns.

PARAMETERS ^

The following parameters can be used:

match_url (required)

A regexp string or array ref of regexp strings to try to match the current URL against.

cache_dir (optional)

A directory to write the cached responses.

Thanks to Strategic Data for supporting the writing and release of this module.

debug (optional)

Set to 1 to warn cache information.

AUTHOR ^

Ingy döt Net <ingy@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright (c) 2011. Ingy döt Net.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html

syntax highlighting: