From cb481d9c28759f56dcc2544fb07a055025ced28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Fri, 12 Aug 2022 09:45:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(session):=E5=A2=9E=E5=8A=A0=E6=B8=85?= =?UTF-8?q?=E9=99=A4=E7=94=A8=E6=88=B7=E4=BC=9A=E8=AF=9D=E7=9A=84=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=87=BD=E6=95=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cache/session.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cache/session.go b/cache/session.go index 2fefb7d..a656c09 100644 --- a/cache/session.go +++ b/cache/session.go @@ -20,3 +20,8 @@ func HasSession(token string) (bool, error) { key := fmt.Sprintf("session:%s", token) return Exists(key) } + +func ClearSession(token string) (bool, error) { + key := fmt.Sprintf("session:%s", token) + return Delete(key) +}