增加 hdel

This commit is contained in:
iVampireSP.com 2023-02-09 19:46:29 +08:00
parent 25add076f9
commit 0c4c495758
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -85,6 +85,12 @@ public static function hset($key, $value, $data = []): void
Redis::hset(self::$prefix.$key, $value, json_encode($data)); Redis::hset(self::$prefix.$key, $value, json_encode($data));
} }
public static function hdel($key, $data = []): void
{
/** @noinspection PhpUndefinedMethodInspection */
Redis::hdel(self::$prefix.$key, $data);
}
/** /**
* @param string|array $events 事件名称 * @param string|array $events 事件名称
* @param $callback callable 回调函数,接收一个参数,为事件数据。 * @param $callback callable 回调函数,接收一个参数,为事件数据。