Feat: room expiry
This commit is contained in:
@ -34,6 +34,10 @@ func saveRoom(room *models.Room) error {
|
||||
return err
|
||||
}
|
||||
memcache.Set(key, data)
|
||||
// do I need last action here? since room save is kind of an action on itself
|
||||
// time.Now().Add(time.Hour).Sub(room.LastActionTS)
|
||||
anHour := int64(216000) // 60 * 60 * 60
|
||||
memcache.Expire(key, anHour)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user