24 lines
458 B
PHP
24 lines
458 B
PHP
<?php
|
|
|
|
namespace App\Cache\Key;
|
|
|
|
use App\Cache\Base\KeyBaseCache;
|
|
|
|
class TronKeyCache extends KeyBaseCache
|
|
{
|
|
protected string $prefix = 'WalletTronKeyCache:'; //缓存前缀
|
|
|
|
const NOW_BLOCK = 'nowBlock'; //当前区块
|
|
|
|
function setNowBlock(string $block): bool
|
|
{
|
|
return $this->setKey(self::NOW_BLOCK, $block);
|
|
}
|
|
|
|
function getNowBlock(): bool|array|string|null
|
|
{
|
|
return $this->getByKey(self::NOW_BLOCK);
|
|
}
|
|
|
|
}
|