feat : cache Adapter
This commit is contained in:
30
app/Service/Test/Adapter/Cache/RedisCacheService.php
Normal file
30
app/Service/Test/Adapter/Cache/RedisCacheService.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* This service file is part of item.
|
||||
*
|
||||
* @author ctexthuang
|
||||
* @contact ctexthuang@qq.com
|
||||
* @web_site https://ctexthuang.com
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Test\Adapter\Cache;
|
||||
|
||||
use App\Interface\Test\Adapter\CacheInterface;
|
||||
|
||||
class RedisCacheService implements CacheInterface
|
||||
{
|
||||
/**
|
||||
* @param string $key
|
||||
* @return array
|
||||
*/
|
||||
public function get(string $key): array
|
||||
{
|
||||
return [
|
||||
'key' => $key,
|
||||
'cache' => 'redis',
|
||||
'msg' => 'redis cache fetch success',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user