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.
- Host: GitHub
- URL: https://github.com/inanepain/cache
- Owner: inanepain
- License: unlicense
- Created: 2023-01-25T11:47:31.000Z (over 2 years ago)
- Default Branch: develop
- Last Pushed: 2023-06-27T09:16:42.000Z (almost 2 years ago)
- Last Synced: 2025-02-03T21:53:44.969Z (4 months ago)
- Language: PHP
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Changelog: CHANGELOG.md
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: autoSome 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');
----