codin / stash
0.1.1
2022-03-22 04:17 UTC
Requires
- php: >=7.4
- psr/cache: ^1
Requires (Dev)
- friends-of-phpspec/phpspec-code-coverage: @stable
- friendsofphp/php-cs-fixer: @stable
- phpspec/phpspec: @stable
- phpstan/phpstan: @stable
Provides
This package is auto-updated.
Last update: 2024-11-28 21:38:55 UTC
README
Example
use Codin\Stash\{ Item, Adapter\RedisPool Adapter\Redis\ConnectionResolver }; $resolver = new ConnectionResolver(static function () { return new Redis(); }); $pool = new RedisPool($resolver); $item = new Item('my-key', 'some data'); $item->expiresAfter(3600); // 1 hour $pool->save($item); $item = $pool->getItem('my-key'); echo $item->get(); // some data echo $item->isHit(); // true
Testing
php bin/phpstan php bin/phpspec run