An open API service indexing awesome lists of open source software.

https://github.com/inanepain/cache

Some simple caching tools implementing PSR-6 and PSR-16.
https://github.com/inanepain/cache

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

= Cache
:author: Philip Michael Raab
:email:
:revnumber: 0.1.0
:revdate: 2022-08-21
:experimental:
:source-highlighter: highlight.js
:icons: font
:toc: auto

Some simple caching tools implementing link:https://www.php-fig.org/psr/psr-6[`PSR-6`] and link:https://www.php-fig.org/psr/psr-16[`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
[source,php]
----
$rfc = new \Inane\Cache\RemoteFileCache();
$html = $rfc->get('http://example.com/files/example.html');
----