sacred / simple-cache-bridge
v1.0.0
2023-01-21 08:26 UTC
Requires
- php: ^8.0
- psr/cache: ^2.0|^3.0
- psr/simple-cache: ^2.0|^3.0
Requires (Dev)
- phpstan/extension-installer: ^1.2
- phpstan/phpstan: ^1.9
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-strict-rules: ^1.4
- phpunit/phpunit: ^9.5
- symfony/cache: ^5.4|^6.0
README
This package allows you to convert your PSR-6 cache into PSR-16 simple cache.
Install
composer require sacred/simple-cache-bridge
Basic usage
use Sacred\Cached\SimpleCacheFromCacheItemPool; $psr6Cache = new AnyPSR6CacheItemPool(); $simpleCache = new SimpleCacheFromCacheItemPool($psr6Cache); $simpleCache->set('key','some-data'); $value = $simpleCache->get('key'); // some-data