ICacheClient interface

定义 getter 和 setter 的缓存的接口

方法

get(string)

从缓存中检索值

set(string, string)

使用提供的密钥保存所需的值以缓存

方法详细信息

get(string)

从缓存中检索值

function get(key: string): Promise<string>

参数

key

string

缓存中项的键

返回

Promise<string>

Promise<字符串>

set(string, string)

使用提供的密钥保存所需的值以缓存

function set(key: string, value: string): Promise<string>

参数

key

string

缓存中项的键

value

string

要在缓存中保存的项的值

返回

Promise<string>

Promise<字符串>