From 0c4c4957581f16275fc711e0e23f97bd93bb7412 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Thu, 9 Feb 2023 19:46:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20hdel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Support/ClusterSupport.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Support/ClusterSupport.php b/app/Support/ClusterSupport.php index 532137c..bd528b1 100644 --- a/app/Support/ClusterSupport.php +++ b/app/Support/ClusterSupport.php @@ -85,6 +85,12 @@ public static function hset($key, $value, $data = []): void 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 $callback callable 回调函数,接收一个参数,为事件数据。