Scroll to navigation

Plack::Middleware::Cache(3pm) User Contributed Perl Documentation Plack::Middleware::Cache(3pm)

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:

A regexp string or array ref of regexp strings to try to match the current URL against.
A directory to write the cached responses.
Set to 1 to warn cache information.

THANKS

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

AUTHOR

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

COPYRIGHT AND LICENSE

Copyright 2011-2014. 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>

2018-04-22 perl v5.26.2