Plack::Middleware::Cache(3pm)

Plack::Middleware::Cache3pm

Use cached responses of certain uris

Usage

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

Overview

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.

debug (optional)

Set to 1 to warn cache information.

Thanks

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

Releases

6 releases since Debian 8 (Jessie); the text changed 2 times.

  1. 8–9
  2. 10–11
  3. 12–13

Author

Ingy döt Net <[email protected]>

From libplack-middleware-cache-perl 0.19-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.