feat: redis api

This commit is contained in:
xingyu 2022-07-21 11:43:57 +08:00
parent 882bbb2187
commit cb091d1853

View File

@ -23,3 +23,21 @@ export const getKeyListApi = (keyTemplate: string) => {
} }
}) })
} }
// 获取缓存内容
export const getKeyValue = (key: string) => {
return request.get({ url: '/infra/redis/get-key-value?key=' + key })
}
// 根据键名删除缓存
export const deleteKey = (key: string) => {
return request.delete({ url: '/infra/redis/delete-key?key=' + key })
}
export const deleteKeys = (keyTemplate: string) => {
return request.delete({
url: '/infra/redis/delete-keys?',
params: {
keyTemplate
}
})
}