refactor: harden task authority and room mutations
This commit is contained in:
@@ -45,6 +45,13 @@ export interface IRedisService {
|
||||
*/
|
||||
set(key: string, value: string, ttl?: number): Promise<void>;
|
||||
|
||||
/**
|
||||
* 仅当键不存在时设置值,用于 nonce、幂等键等原子占位。
|
||||
*
|
||||
* @returns 成功占位返回 true,键已存在返回 false
|
||||
*/
|
||||
setIfAbsent(key: string, value: string, ttl?: number): Promise<boolean>;
|
||||
|
||||
/**
|
||||
* 设置键值对并指定过期时间
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user