33 lines
634 B
PHP
33 lines
634 B
PHP
<?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;
|
|
|
|
use App\Interface\Test\Adapter\CacheInterface;
|
|
use App\Service\Test\TestBaseService;
|
|
use Hyperf\Di\Annotation\Inject;
|
|
|
|
class CacheService extends TestBaseService
|
|
{
|
|
/**
|
|
* @var CacheInterface
|
|
*/
|
|
#[Inject]
|
|
private CacheInterface $cache;
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
public function handle(): array
|
|
{
|
|
return $this->return->success('success',$this->cache->get('test_key'));
|
|
}
|
|
} |