- SEE ALSO
- COPYRIGHT AND LICENSE
HTTP::Tiny::Cache - Cache HTTP::Tiny responses
This document describes version 0.002 of HTTP::Tiny::Cache (from Perl distribution HTTP-Tiny-Cache), released on 2019-04-14.
use HTTP::Tiny::Cache; my $res = HTTP::Tiny::Cache->new->get("http://www.example.com/"); my $res2 = HTTP::Tiny::Cache->request(GET => "http://www.example.com/"); # cached response
This class is a subclass of HTTP::Tiny that cache responses.
Currently only GET requests are cached. Cache are keyed by SHA256-hex(URL). Error responses are also cached. Currently no cache-related HTTP request or response headers (e.g.
Cache-Control) are respected.
To determine cache max age, this module will consult environment variables (see "ENVIRONMENT"). If all environment variables are not set, will use the default 86400 (1 day).
Int. Will be consulted after "HTTP_TINY_CACHE_MAX_AGE".
Int. Will be consulted before "CACHE_MAX_AGE".
Please visit the project's homepage at https://metacpan.org/release/HTTP-Tiny-Cache.
Source repository is at https://github.com/perlancar/perl-HTTP-Tiny-Cache.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=HTTP-Tiny-Cache
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
HTTP::Tiny::Patch::Cache, patch version of this module.
This software is copyright (c) 2019, 2018 by email@example.com.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.