jacklul / cachefs
该软件包已被弃用且不再维护。未建议替代包。
使用PSR-16缓存接口作为存储的文件系统包装器
0.1.0
2018-05-15 18:25 UTC
Requires
- php: ^5.5|^7.0
- psr/simple-cache: ^1.0
Requires (Dev)
This package is auto-updated.
Last update: 2020-11-26 00:51:20 UTC
README
使用PSR-16缓存接口作为存储的功能虚拟文件系统,适用于测试或作为持久缓存文件系统。
安装
使用 Composer 安装
$ composer require jacklul/cachefs
用法
$memcached = new MemcachedAdapter(); // PSR-16 compatible interface jacklul\CacheFS\CacheFS::register($memcached); jacklul\CacheFS\CacheFS::register($memcached, 'myfilesystem'); // using custom stream name // Write to 'text.txt' file file_put_contents('cachefs://test.txt', 'test123'); // Create 'test' directory mkdir('cachefs://test/'); // List root filesystem contents print_r(scandir('cachefs://'));
许可证
请参阅 LICENSE.