()
| 29 | |
| 30 | class SecureStorage { |
| 31 | constructor() { |
| 32 | // 优先使用 sessionStorage (关闭浏览器即清除) |
| 33 | // 若需跨标签页共享,可使用 localStorage,但必须加过期时间 |
| 34 | this.storage = safeGetStorage('sessionStorage'); |
| 35 | this.fallbackStorage = new Map(); // 内存降级 |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * 设置带过期时间的数据 |
nothing calls this directly
no test coverage detected