add cache storage placeholder

This commit is contained in:
2025-11-12 09:32:49 +08:00
parent e46da76458
commit 6949ea8d71
2 changed files with 78 additions and 0 deletions
+64
View File
@@ -0,0 +1,64 @@
<?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace App\Storage;
use bandwidthThrottle\tokenBucket\storage\scope\GlobalScope;
use bandwidthThrottle\tokenBucket\storage\Storage;
use Hyperf\RateLimit\Storage\StorageInterface;
use Psr\Container\ContainerInterface;
class EmptyStorage implements StorageInterface, Storage, GlobalScope
{
public function __construct(ContainerInterface $container, string $key, int $timeout, array $options = [])
{
}
public function getMutex()
{
return new class {
public function check($callback)
{
return $this;
}
public function then($callback)
{
return $this;
}
};
}
public function isBootstrapped()
{
}
public function bootstrap($microtime)
{
}
public function remove()
{
}
public function setMicrotime($microtime)
{
}
public function letMicrotimeUnchanged()
{
}
public function getMicrotime()
{
}
}