Redis service
This commit is contained in:
18
app/src/Service/Redis.php
Normal file
18
app/src/Service/Redis.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace Incoviba\Service;
|
||||
|
||||
use Predis\Client;
|
||||
|
||||
class Redis
|
||||
{
|
||||
public function __construct(protected Client $client) {}
|
||||
|
||||
public function get(string $name): mixed
|
||||
{
|
||||
return $this->client->get($name);
|
||||
}
|
||||
public function set(string $name, mixed $value): void
|
||||
{
|
||||
$this->client->set($name, $value);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user