| 1 |
NAME |
| 2 |
Plack::Middleware::Cache - Use Cached Responses of Certain URIs |
| 3 |
|
| 4 |
SYNOPSIS |
| 5 |
builder { |
| 6 |
enable "Cache", |
| 7 |
match_url => [ |
| 8 |
'^/foo/', |
| 9 |
'\\?.*xxx=.*', |
| 10 |
], |
| 11 |
cache_dir => '/tmp/plack-cache'; |
| 12 |
$app; |
| 13 |
}; |
| 14 |
|
| 15 |
DESCRIPTION |
| 16 |
This middleware allows you to cache expensive and non-changing responses |
| 17 |
from URIs that match a list of regular expression patterns. |
| 18 |
|
| 19 |
PARAMETERS |
| 20 |
The following parameters can be used: |
| 21 |
|
| 22 |
match_url (required) |
| 23 |
A regexp string or array ref of regexp strings to try to match the |
| 24 |
current URL against. |
| 25 |
|
| 26 |
cache_dir (optional) |
| 27 |
A directory to write the cached responses. |
| 28 |
|
| 29 |
debug (optional) |
| 30 |
Set to 1 to warn cache information. |
| 31 |
|
| 32 |
THANKS |
| 33 |
Thanks to Strategic Data for supporting the writing and release of this |
| 34 |
module. |
| 35 |
|
| 36 |
AUTHOR |
| 37 |
Ingy döt Net <[email protected]> |
| 38 |
|
| 39 |
COPYRIGHT AND LICENSE |
| 40 |
Copyright 2011-2014. Ingy döt Net. |
| 41 |
|
| 42 |
This program is free software; you can redistribute it and/or modify it |
| 43 |
under the same terms as Perl itself. |
| 44 |
|
| 45 |
See <http://www.perl.com/perl/misc/Artistic.html> |
| 46 |
|