缓存支持读取缓存key的剩余有效时间

This commit is contained in:
zhangdeman committed 2024-10-09 18:30:12 +08:00
1 parent 225a1ae9b2
commit 9088f515d3
5 files changed
+52 -6

No files matched your search

+2
View File
@@ -26,6 +26,8 @@ type ResultParseFunc func(res string) error
type ICache interface {
// Exist 缓存是否存在
Exist(ctx context.Context, cacheInstanceFlag string, key string) (bool, error)
// TTL key还有多长时间过期
TTL(ctx context.Context, cacheInstanceFlag string, key string) (int64, error)
// Set 设置缓存
Set(ctx context.Context, cacheInstanceFlag string, key string, value string, ttl int64) error
// Get 读取原始缓存数据
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.