jeroen/file-fetcher-cache

Provides a SimpleCache (PSR-16) decorator for file fetchers

Maintainers

👁 Jeroen De Dauw

Package info

github.com/JeroenDeDauw/file-fetcher-cache

pkg:composer/jeroen/file-fetcher-cache

Statistics

Installs: 164 999

Dependents: 3

Suggesters: 2

Stars: 1

Open Issues: 1

1.1.0 2026-01-29 14:44 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

GPL-2.0-or-later c281d84e7c125b7b286f7fabf2ebe1e84f78573a

cachecachingsimplecachefile_get_contentssimple-cachepsr-16file-fetcherfilefetcher

This package is auto-updated.

Last update: 2026-05-29 17:57:41 UTC


README

👁 GitHub Workflow Status
👁 Code Coverage
👁 Scrutinizer Code Quality
👁 Latest Stable Version
👁 Download count

Provides simple caching decorators for FileFetcher implementations.

Usage

The FileFetcher decorators are constructed via FileFetcher\Cache\Factory.

Once you constructed a FileFetcher, fetching a file is easy:

$fileContent = $fileFetcher->fetchFile($fileLocation);

To test your code you can use all the test doubles provided by FileFetcher itself.

Installation

To use the FileFetcher Cache library in your project, simply add a dependency on jeroen/file-fetcher-cache to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on FileFetcher Cache 1.x:

{
 "require": {
 "jeroen/file-fetcher-cache": "~1.0"
 }
}

Development

Start by installing the project dependencies by executing

composer update

You can run the tests by executing

make test

You can run the style checks by executing

make cs

To run all CI checks, execute

make ci

You can also invoke PHPUnit directly to pass it arguments, as follows

vendor/bin/phpunit --filter SomeClassNameOrFilter

Release notes

1.1.0 (2026-01-29)

  • Raised minimum PHP version to 8.0
  • Raised minimum psr/simple-cache to 2.0
  • Added support for psr/simple-cache 2 and 3

1.0.1 (2020-08-19)

  • Updated attribution in composer.json

1.0.0 (2019-01-17)

Initial release with decorators for PSR-16 SimpleCache and jeroen/simple-cache.