更新web服务器自定义token解析回调

This commit is contained in:
2025-04-18 11:06:34 +08:00
parent 700479d131
commit cff5448fe0
6 changed files with 91 additions and 25 deletions

View File

@@ -62,6 +62,10 @@ class Redis {
return await _command?.send_object(["GET", key]);
}
Future<bool> delete(String key) async {
return await _command?.send_object(["DEL", key]) == "OK";
}
Future<bool> setWithExpiry(String key, String value, int ttlInSeconds) async {
var response = await _command
?.send_object(["SETEX", key, ttlInSeconds.toString(), value]);