Files
hyperf_test/app/Service/Test/Adapter/Cache/FileCacheAdapter.php
2025-09-05 14:12:56 +08:00

39 lines
751 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\Cache;
use App\Interface\Test\Adapter\CacheInterface;
class FileCacheAdapter implements CacheInterface
{
/**
* @var FileCacheService $fileCache
*/
private FileCacheService $fileCache;
/**
* @param FileCacheService $fileCache
*/
public function __construct(FileCacheService $fileCache)
{
$this->fileCache = $fileCache;
}
/**
* @param string $key
* @return array
*/
public function get(string $key): array
{
return $this->fileCache->fetch($key);
}
}