Skip to content

Repository files navigation

PSR6 Cache Implementation

versionworkflowlicense

Example

useCodin\Stash\{
Item,
Adapter\RedisPool
Adapter\Redis\ConnectionResolver
};
$resolver = newConnectionResolver(staticfunction () {
returnnewRedis();
});
$pool = newRedisPool($resolver);
$item = newItem('my-key', 'some data');
$item->expiresAfter(3600); // 1 hour$pool->save($item);
$item = $pool->getItem('my-key');
echo$item->get(); // some dataecho$item->isHit(); // true

Testing

php bin/phpstan
php bin/phpspec run

About

psr6 simple cache implementation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages