|
@@ -62,7 +62,7 @@ const setClient = promisify(client.set).bind(client);
|
|
|
const setexClient = promisify(client.setex).bind(client);
|
|
|
|
|
|
// 内存存储promise化,为了和redis使用方法保持一致
|
|
|
-const getCache = (key: string): Promise<string> => {
|
|
|
+const getCache = (key: string): Promise<string|undefined> => {
|
|
|
return new Promise(resolve => {
|
|
|
resolve(cache.get(key))
|
|
|
})
|