Documentation ¶
Index ¶
- Constants
- type Cookie
- func (cookie *Cookie) AddToCart(token string, itemId string, count int)
- func (cookie *Cookie) CheckToken(token string) string
- func (cookie *Cookie) ClearSessionDaemon()
- func (cookie *Cookie) PageCacheGet(request string) string
- func (cookie *Cookie) PageCacheSet(request, page string)
- func (cookie *Cookie) UpdateToken(token string, userId string, itemIds []string)
Constants ¶
View Source
const CartKey = "cart:"
View Source
const PageCacheKey = "pageCache:"
View Source
const RecentlyLoginKey = "recentlyLogin"
View Source
const RecentlyLoginNum = 1000000
View Source
const Token2UserIdKey = "login"
View Source
const ViewedSetKey = "view:" // 客户看了哪些商品
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cookie ¶
func (*Cookie) CheckToken ¶
CheckToken: 尝试获取并返回令牌对应的用户Id
func (*Cookie) ClearSessionDaemon ¶
func (cookie *Cookie) ClearSessionDaemon()
ClearSessionDaemon: daemon 运行, 用于清空session
func (*Cookie) PageCacheGet ¶
PageCacheGet: 获取网页缓存
func (*Cookie) PageCacheSet ¶
PageCacheSet: 设置网页缓存
Click to show internal directories.
Click to hide internal directories.