inanepain/cache

Some simple caching tools implementing PSR-6 and PSR-16.

0.2.1 2023-06-27 09:16 UTC

This package is auto-updated.

Last update: 2024-10-27 12:29:44 UTC


README

Table of Contents

Some simple caching tools implementing PSR-6 and PSR-16.

Goals

There is a lot to cover here so best I keep a bit of a record so as not to let bits fall between the cracks. As a bonus, a record will help keep me focus on the goal as well as track progress.

Primary Goal

To reduce remote access when using internet sourced data.

Example

Basic example creating a RemoteFileCache object and using it. Using the defaults any subsequent requests, within a one day period for the same url, retrieves content from cache.

Basic RemoteFileCache Example
$rfc = new \Inane\Cache\RemoteFileCache();
$html = $rfc->get('http://example.com/files/example.html');