Squashed commit of the following: commit 53d1f382c5142f6a388b2d3fa13caef04a48db91 Author: Sun <95302870@qq.com> Date: Tue Jan 9 11:54:33 2024 +0800 系统状态标题加上阴影,beta版本最终优化 commit fc56328765b8a4d902b59f2393f43e10f3c3dac5 Author: Sun <95302870@qq.com> Date: Mon Jan 8 22:37:24 2024 +0800 磁盘监控增加表单验证 commit 3905717d420d8339e0d04443a79e69229cd10a1a Author: Sun <95302870@qq.com> Date: Mon Jan 8 22:36:10 2024 +0800 删除无用文件 commit 89b6b633107832465973656abfdb6e25be156747 Author: Sun <95302870@qq.com> Date: Mon Jan 8 21:10:10 2024 +0800 修改翻译文件为json格式(为了方便引用插件)优化过期登录弹窗多个的问题 commit 2efb31571ebe5997113c75e69f973dd436cef985 Author: Sun <95302870@qq.com> Date: Mon Jan 8 13:56:57 2024 +0800 增加vscode工作区文件 commit bc79b661db2defa36bdfadb13b1038e906e36d7e Author: Sun <95302870@qq.com> Date: Mon Jan 8 13:56:45 2024 +0800 暂时解决依赖循环的问题 commit a24520f8087a45abe08ee7ea864169888754a5fc Author: Sun <95302870@qq.com> Date: Sun Jan 7 20:07:52 2024 +0800 修改设置里面壁纸提示词错误的问题修改首页默认标题 commit 394c6ce20ce33cd3edf43b33ac7c1f5b23cfe89a Author: Sun <95302870@qq.com> Date: Sun Jan 7 14:53:53 2024 +0800 适配多语言 Squashed commit of the following: commit 632f86c0228c68391c01865c7576f3aa0408c102 Author: Sun <95302870@qq.com> Date: Sun Jan 7 14:47:55 2024 +0800 退出的时候清除appstore commit b9d805e49a3c6b2ad38bc8d527cb12cc8709012e Author: Sun <95302870@qq.com> Date: Sun Jan 7 13:55:20 2024 +0800 系统状态监控适配国际化 commit daece99723ec96d210241d2ca4e5a85dc5ae69bd Author: Sun <95302870@qq.com> Date: Sun Jan 7 13:09:46 2024 +0800 适配添加项目页面的国际化配置还有时钟的星期* commit 8ea2b2fe951f6266415c96a197cb8d00faef4058 Author: Sun <95302870@qq.com> Date: Sun Jan 7 12:01:55 2024 +0800 完成适配所有apps国际化 commit 21ef54e0d4afb10f560c8cb7aff666374afe0f87 Author: Sun <95302870@qq.com> Date: Sat Jan 6 21:36:07 2024 +0800 增加读取默认浏览器语言 commit 6f710bbebe63ab2800193f27c71e5c0034f11978 Author: Sun <95302870@qq.com> Date: Sat Jan 6 21:09:58 2024 +0800 登录页面增加语言选择选项 commit cb7c4a89a160ed3ef91ad566ec98e75325e7601f Author: Sun <95302870@qq.com> Date: Sat Jan 6 20:37:16 2024 +0800 首次尝试增加英文语言,并在我的信息设置 commit fb996e17cd11611d30c0e12feee00ddf7b225e32 Author: Sun <95302870@qq.com> Date: Sat Jan 6 18:22:40 2024 +0800 完成基础设置页面的语言国际化适配 commit ffc378a38fa4221a9240b067660614ab43009325 Author: Sun <95302870@qq.com> Date: Sat Jan 6 17:35:13 2024 +0800 增加完善基本配置中的系统状态开关 commit c91eaf3e941dfa91b7feca925109ec7121874fda Merge: 7ebe358 a60f72c Author: Sun <95302870@qq.com> Date: Sat Jan 6 12:57:05 2024 +0800 Merge branch 'feature/monitor2' into dev commit 7ebe35856e423bb10d8078636b0c80e472203a68 Merge: d3e3cf5 779712a Author: Sun <95302870@qq.com> Date: Sat Jan 6 12:56:15 2024 +0800 Merge branch 'feature/footer' into dev commit a60f72c2779a4adee77f4ab161fb4fad21ff0611 Author: Sun <95302870@qq.com> Date: Sat Jan 6 12:55:04 2024 +0800 优化了首页 commit 899c945fff12290f3c81348a3c262400b1a0ce15 Author: Sun <95302870@qq.com> Date: Sat Jan 6 12:54:19 2024 +0800 完成系统监控 commit cdf16277ff85cee5029de3b7ea78b14bc0274623 Author: Sun <95302870@qq.com> Date: Sat Jan 6 12:41:38 2024 +0800 增加删除功能 commit 128af005ebc95b73ecef8873301a61556984fbea Author: Sun <95302870@qq.com> Date: Sat Jan 6 11:56:32 2024 +0800 完成排序保存功能 commit 3f4b3c67f261f21121c8e9f7c14d926f152a5836 Author: Sun <95302870@qq.com> Date: Sat Jan 6 11:46:59 2024 +0800 初步完成了增改查包括磁盘状态 commit a85d90985df45af75f8fbc165021b160d5e6500d Author: Sun <95302870@qq.com> Date: Fri Jan 5 22:19:47 2024 +0800 增加磁盘信息卡片的适配 commit c955afd86134b38620a884e9e6540eda398392e4 Author: Sun <95302870@qq.com> Date: Fri Jan 5 21:36:38 2024 +0800 增加获取磁盘挂载点接口 commit 21e8e8f1b872a7e7989c45b29061f52127dffce5 Author: Sun <95302870@qq.com> Date: Fri Jan 5 21:14:57 2024 +0800 基础完成了增改查cpu和内存状态 commit bdbcd50aa1b1b6958043e26be5b705430312c64c Author: Sun <95302870@qq.com> Date: Fri Jan 5 14:25:09 2024 +0800 优化公共入口组件 commit 9735e67a7d6334e39d4f58b053c32b3be25e7fa8 Author: Sun <95302870@qq.com> Date: Fri Jan 5 14:01:46 2024 +0800 适配三个组件 commit 3a82949afc64147209be046f9298d55096abd0c3 Author: Sun <95302870@qq.com> Date: Fri Jan 5 13:58:58 2024 +0800 优化组件 commit 0d0421c8ebc749889422c416970fd5760f2a5f6a Author: Sun <95302870@qq.com> Date: Fri Jan 5 13:27:29 2024 +0800 初步完成了编辑器 commit 1474f796fc29051b7e0813839dbb6bdc22293990 Author: Sun <95302870@qq.com> Date: Thu Jan 4 16:22:33 2024 +0800 完成大图标小图标切换 commit baf64a927280fdb04579d5afeff1b5d50e56556a Author: Sun <95302870@qq.com> Date: Thu Jan 4 12:08:39 2024 +0800 增加获取各项监控的单独api commit d3e3cf5d58168cad1e2fa3c96e2381c21aabcab4 Author: Sun <95302870@qq.com> Date: Wed Jan 3 20:46:58 2024 +0800 尝试将所有监控放在顶部 commit 8dfec7e4b78cc393fad96df9d452c5f2dd4933bb Author: Sun <95302870@qq.com> Date: Wed Jan 3 20:02:03 2024 +0800 完整横条显示并对容量尺寸单位优化自动识别 commit fe967a93141472970616a5eac416c59510810b64 Author: Sun <95302870@qq.com> Date: Wed Jan 3 18:55:39 2024 +0800 适配显示了cpu、硬盘、内存信息 commit 11ea134be3ce8aca9c1bf6af4610e3bb4e09eca7 Author: Sun <95302870@qq.com> Date: Tue Jan 2 23:14:04 2024 +0800 完成系统监控的基础api接口 commit c447884d77349553864e0e045b83b3a4b67345da Author: Sun <95302870@qq.com> Date: Tue Jan 2 22:11:34 2024 +0800 完成基本的系统监控类库 commit 779712a5da617fa090056a5d549145f687d8db54 Author: Sun <95302870@qq.com> Date: Tue Jan 2 17:14:16 2024 +0800 增加自定义footer
39 lines
729 B
Go
39 lines
729 B
Go
package cache
|
||
|
||
import (
|
||
"time"
|
||
)
|
||
|
||
const (
|
||
CACHE_DRIVE_REDIS = "redis"
|
||
CACHE_DRIVE_MEMORY = "memory"
|
||
)
|
||
|
||
// 缓存接口-支持Redis和内存使用
|
||
type Cacher[T any] interface {
|
||
// 设置
|
||
Set(k string, v T, d time.Duration)
|
||
|
||
// 取值
|
||
Get(k string) (T, bool)
|
||
|
||
// 设置-过期时间采用默认值
|
||
SetDefault(k string, v T)
|
||
|
||
// 删除
|
||
Delete(k string)
|
||
|
||
// 只有在给定Key项尚未存在,或者现有项已过期时,才能将项添加到缓存中。否则返回错误。
|
||
// Add(k string, v T, d time.Duration)
|
||
// IncrementInt(k string, n int) (num int, err error)
|
||
|
||
// 设置值,但不重置过期时间
|
||
SetKeepExpiration(k string, v T)
|
||
|
||
// 项目总数
|
||
ItemCount() (int64, error)
|
||
|
||
// 清空
|
||
Flush()
|
||
}
|