Documentation ¶
Index ¶
Constants ¶
View Source
const (
LoginKey = "login:%s"
)
常量
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache interface { // Get 获取一个缓存 Get(key string) (val string, exist bool) // Set 设置一个值 Set(key, val string, expiration time.Duration) // Del 删除知道keys Del(key ...string) (err error) }
Cache 缓存接口 - 用户缓存登录信息
var ( // DefaultMemCache 默认缓存对象 DefaultMemCache Cache )
type MemCache ¶
type MemCache struct {
// contains filtered or unexported fields
}
MemCache 内存缓存 https://github.com/patrickmn/go-cache
Click to show internal directories.
Click to hide internal directories.