firehed / null-psr16
始终离线PSR-16缓存实现,用于回退和测试
0.1.0
2021-06-02 23:42 UTC
Requires
- php: ^8.0
- psr/simple-cache: ^1.0
Requires (Dev)
- phpstan/phpstan: ^0.12.46
- phpstan/phpstan-strict-rules: ^0.12.5
- phpunit/phpunit: ^9.3
- squizlabs/php_codesniffer: ^3.5
This package is auto-updated.
Last update: 2024-09-10 00:08:07 UTC
README
这是一个始终失败的PSR-16实现。
此实现的动机是为了在级联缓存驱动程序中的回退处理。而不是因为无法连接到缓存而导致应用程序的缓存完全失败,它可以回退到像这样的非抛出实现的缓存。
对于需要确保正确非抛出失败处理并且不想编写模拟驱动程序的测试来说也非常有用。
安装和使用
安装: composer require firehed/null-psr16
使用
$cache = new \Firehed\Cache\NullPsr16(); // Use like any other PSR-16 implementation