From 49a44d1b83ac907ca86b36222a2e967f79a90ffb Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期四, 02 一月 2025 13:38:05 +0800
Subject: [PATCH] 调度方案运行状态显示

---
 src/hooks/web/useCache.ts |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/hooks/web/useCache.ts b/src/hooks/web/useCache.ts
index 4f39f30..f6b2bd1 100644
--- a/src/hooks/web/useCache.ts
+++ b/src/hooks/web/useCache.ts
@@ -37,3 +37,19 @@
   wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
   // 注意,不要清理 LoginForm 登录表单
 }
+
+export const useSessionCache = (type: CacheType = 'sessionStorage') => {
+  const wsSessionCache: WebStorageCache = new WebStorageCache({
+    storage: type
+  })
+
+  return {
+    wsSessionCache
+  }
+}
+
+export const deleteUserSessionCache = () => {
+  const { wsSessionCache } = useSessionCache()
+  wsSessionCache.delete(CACHE_KEY.ROLE_ROUTERS)
+  // 注意,不要清理 用户和 LoginForm 登录表单
+}

--
Gitblit v1.9.3