From ade1d01e31ba7c04fa9f10a72df644be8c0e5cc8 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 25 Jun 2022 09:42:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=93=E5=AD=98=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=8F=9C=E5=8D=95=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/monitor/cache.js | 50 +++++- src/assets/icons/svg/redis-list.svg | 2 + src/views/monitor/cache/index.vue | 6 +- src/views/monitor/cache/list.vue | 241 ++++++++++++++++++++++++++++ 4 files changed, 295 insertions(+), 4 deletions(-) create mode 100644 src/assets/icons/svg/redis-list.svg create mode 100644 src/views/monitor/cache/list.vue diff --git a/src/api/monitor/cache.js b/src/api/monitor/cache.js index 202a02c..e1f2c87 100644 --- a/src/api/monitor/cache.js +++ b/src/api/monitor/cache.js @@ -6,4 +6,52 @@ export function getCache() { url: '/monitor/cache', method: 'get' }) -} \ No newline at end of file +} + +// 查询缓存名称列表 +export function listCacheName() { + return request({ + url: '/monitor/cache/getNames', + method: 'get' + }) +} + +// 查询缓存键名列表 +export function listCacheKey(cacheName) { + return request({ + url: '/monitor/cache/getKeys/' + cacheName, + method: 'get' + }) +} + +// 查询缓存内容 +export function getCacheValue(cacheName, cacheKey) { + return request({ + url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey, + method: 'get' + }) +} + +// 清理指定名称缓存 +export function clearCacheName(cacheName) { + return request({ + url: '/monitor/cache/clearCacheName/' + cacheName, + method: 'delete' + }) +} + +// 清理指定键名缓存 +export function clearCacheKey(cacheKey) { + return request({ + url: '/monitor/cache/clearCacheKey/' + cacheKey, + method: 'delete' + }) +} + +// 清理全部缓存 +export function clearCacheAll() { + return request({ + url: '/monitor/cache/clearCacheAll', + method: 'delete' + }) +} diff --git a/src/assets/icons/svg/redis-list.svg b/src/assets/icons/svg/redis-list.svg new file mode 100644 index 0000000..98a15b2 --- /dev/null +++ b/src/assets/icons/svg/redis-list.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/src/views/monitor/cache/index.vue b/src/views/monitor/cache/index.vue index 4a7b2f4..02d2f7a 100644 --- a/src/views/monitor/cache/index.vue +++ b/src/views/monitor/cache/index.vue @@ -66,7 +66,7 @@ -