Download the PHP package lustmored/flysystem-v2-simple-cache-adapter without Composer

On this page you can find all versions of the php package lustmored/flysystem-v2-simple-cache-adapter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flysystem-v2-simple-cache-adapter

flysystem-v2-simple-cache-adapter

Build Status

Simple cache decorator for Flysystem v2 Adapters.

Installation

composer require lustmored/flysystem-v2-simple-cache-adapter

Usage

CacheAdapter takes simply 2 parameters:

Example configuration in Symfony with flysystem-bundle (thanks to @weaverryan for summarizing things up):

[OPTIONAL] Create Cache pool to use:

Configure service. Here @flysystem.adapter.uploads_adapter is Flysystem adapter (based on flysystem-bundle configuration for uploads_adapter storage):

Finally, wire it up into flysytem-bundle:

Architecture

Please note this library is in early stages and cache format or functionality may change. I've created it for my own project and needs.

Idea is from flysystem-cached-driver, but cache logic is rethought. Instead of one big cache (that is killing memory when you have tens of thousands of files) it stores items on per-file basis.

Therefore, at least for now, there is no gain on listContents method, yet potential huge gains for fileExists and metadata-related methods (especially on network/cloud filesystems, like S3).

Performance

Benchmarks run with Redis in Docker (via provided docker-compose.yml). S3 benchmarks require setting environment vars (for example by providing .env.bench.local). Cached benchmarks have cache warmed by calling listContents.

Below are reports from single benchmark run on devel machine as of 0.0.4. They show that caching metadata with the local adapter makes no sense, while using it for S3 brings potential huge benefits when querying existing files. fileExists benchmark randomly queries files with about 50% of them existing.

benchmark subject set revs iter mem_peak time_rev comp_z_value comp_deviation
LocalBench benchCopyAndDelete 0 1 0 2,695,904b 9,757.000μs 0.00σ 0.00%
LocalBench benchListContents 0 1 0 2,695,904b 1,925.000μs 0.00σ 0.00%
LocalBench benchMove 0 1 0 2,695,896b 13,083.000μs 0.00σ 0.00%
LocalBench benchRandomFileExists 0 1 0 2,695,904b 1,893.000μs 0.00σ 0.00%
LocalBench benchRandomFileSize 0 1 0 2,695,904b 2,216.000μs 0.00σ 0.00%
LocalBench benchRandomLastModified 0 1 0 2,695,904b 3,689.000μs 0.00σ 0.00%
LocalBench benchRandomMimeType 0 1 0 3,609,408b 28,681.000μs 0.00σ 0.00%
LocalBench benchRandomRead 0 1 0 2,695,896b 3,490.000μs 0.00σ 0.00%
LocalBench benchRandomSetVisibility 0 1 0 2,695,912b 2,958.000μs 0.00σ 0.00%
LocalBench benchRandomVisibility 0 1 0 2,695,904b 2,866.000μs 0.00σ 0.00%
LocalBench benchRandomWrite 0 1 0 2,695,904b 11,619.000μs 0.00σ 0.00%
AwsBench benchCopyAndDelete 0 1 0 14,163,224b 25,638,767.000μs 0.00σ 0.00%
AwsBench benchListContents 0 1 0 10,141,384b 394,385.000μs 0.00σ 0.00%
AwsBench benchMove 0 1 0 17,951,440b 54,856,950.000μs 0.00σ 0.00%
AwsBench benchRandomFileExists 0 1 0 11,294,928b 12,921,070.000μs 0.00σ 0.00%
AwsBench benchRandomFileSize 0 1 0 11,153,896b 5,655,586.000μs 0.00σ 0.00%
AwsBench benchRandomLastModified 0 1 0 11,153,896b 5,901,532.000μs 0.00σ 0.00%
AwsBench benchRandomMimeType 0 1 0 11,153,896b 6,200,496.000μs 0.00σ 0.00%
AwsBench benchRandomRead 0 1 0 11,098,640b 5,975,538.000μs 0.00σ 0.00%
AwsBench benchRandomSetVisibility 0 1 0 11,279,472b 4,980,556.000μs 0.00σ 0.00%
AwsBench benchRandomVisibility 0 1 0 11,086,464b 7,118,953.000μs 0.00σ 0.00%
AwsBench benchRandomWrite 0 1 0 11,223,672b 6,863,634.000μs 0.00σ 0.00%
CachedLocalBench benchCopyAndDelete 0 1 0 3,114,992b 66,819.000μs 0.00σ 0.00%
CachedLocalBench benchListContents 0 1 0 3,114,944b 29,511.000μs 0.00σ 0.00%
CachedLocalBench benchMove 0 1 0 3,114,984b 120,609.000μs 0.00σ 0.00%
CachedLocalBench benchRandomFileExists 0 1 0 3,114,992b 17,195.000μs 0.00σ 0.00%
CachedLocalBench benchRandomFileSize 0 1 0 3,114,992b 22,410.000μs 0.00σ 0.00%
CachedLocalBench benchRandomLastModified 0 1 0 3,114,992b 13,735.000μs 0.00σ 0.00%
CachedLocalBench benchRandomMimeType 0 1 0 4,079,264b 74,065.000μs 0.00σ 0.00%
CachedLocalBench benchRandomRead 0 1 0 3,114,984b 16,104.000μs 0.00σ 0.00%
CachedLocalBench benchRandomSetVisibility 0 1 0 3,115,000b 36,545.000μs 0.00σ 0.00%
CachedLocalBench benchRandomVisibility 0 1 0 3,114,992b 19,188.000μs 0.00σ 0.00%
CachedLocalBench benchRandomWrite 0 1 0 3,114,992b 30,787.000μs 0.00σ 0.00%
CachedAwsBench benchCopyAndDelete 0 1 0 14,701,496b 25,902,601.000μs 0.00σ 0.00%
CachedAwsBench benchListContents 0 1 0 10,741,088b 145,838.000μs 0.00σ 0.00%
CachedAwsBench benchMove 0 1 0 18,489,776b 53,389,348.000μs 0.00σ 0.00%
CachedAwsBench benchRandomFileExists 0 1 0 11,360,328b 9,891,007.000μs 0.00σ 0.00%
CachedAwsBench benchRandomFileSize 0 1 0 10,494,808b 17,082.000μs 0.00σ 0.00%
CachedAwsBench benchRandomLastModified 0 1 0 10,494,808b 16,780.000μs 0.00σ 0.00%
CachedAwsBench benchRandomMimeType 0 1 0 11,362,408b 4,023,242.000μs 0.00σ 0.00%
CachedAwsBench benchRandomRead 0 1 0 11,655,608b 6,180,574.000μs 0.00σ 0.00%
CachedAwsBench benchRandomSetVisibility 0 1 0 11,930,632b 5,753,747.000μs 0.00σ 0.00%
CachedAwsBench benchRandomVisibility 0 1 0 11,319,584b 3,708,345.000μs 0.00σ 0.00%
CachedAwsBench benchRandomWrite 0 1 0 11,791,352b 6,785,903.000μs 0.00σ 0.00%
------------------ -------------------------- ----- ------ ------ ------------- ------------------ -------------- ----------------

All versions of flysystem-v2-simple-cache-adapter with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
league/flysystem Version ^2.0 | ^3.0
psr/cache Version ^1.0 | ^2.0 | ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lustmored/flysystem-v2-simple-cache-adapter contains the following files

Loading the files please wait ....