optimize online user metric cache logic

pull/393/head
Michael Li 9 months ago
parent 43cb264956
commit 47c963da2f
No known key found for this signature in database

@ -31,6 +31,6 @@ func (m *OnlineUserMetric) Name() string {
func (m *OnlineUserMetric) Action() (err error) {
// 暂时仅做标记,不存储其他相关信息
m.ac.Set(conf.KeyOnlineUser.Get(m.uid), []byte{}, m.expire)
m.ac.SetNx(conf.KeyOnlineUser.Get(m.uid), []byte{}, m.expire)
return
}

Loading…
Cancel
Save