oat-sa / lib-flysystem-filecache
flysystem 缓存适配器
v1.2.2
2024-02-16 14:28 UTC
Requires
- php: >=5.5
- league/flysystem: ^1.0.25
Requires (Dev)
- mikey179/vfsstream: 1.4.0
- phpunit/phpunit: ~4.4@dev
- sebastian/global-state: ~1.0@dev
This package is auto-updated.
Last update: 2024-09-16 15:48:22 UTC
README
league/flysystem 的双存储适配器,用于在读取远程文件时保留本地缓存的副本。
它使用两个存储位置,一个远程位置和一个本地位置。在读取操作中,本地位置具有优先级。所有写入操作都在这两个位置上进行。
用法
$remote = new League\Flysystem\AwsS3V3\AwsS3Adapter(...); $local = new League\Flysystem\Adapter\Local(...);
$autosave = true;
$adapter = new oat\LibFlysystemFilecache\model\flysystem\DualStorageAdapter($remote, $local ,autosave);
查看 http://flysystem.thephpleague.com/ 以配置您的适配器