| 123456789101112131415161718192021222324 |
- // Package cache 系统缓存包
- package cache
- import (
- "time"
- )
- type Store interface {
- Set(key, value string, expire time.Duration)
- Get(key string) string
- Has(key string) bool
- Forget(key string)
- Forever(key, value string)
- Flush()
- IsAlive() error
- // Increment 自增
- // 当参数只有1个时,为key 增加1
- // 当参数有2个时,为key 增加值
- Increment(params ...any)
- Decrement(params ...any)
- }
|